)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements an API extension for reporting usage statistcis of IP"},{"line_number":10,"context_line":"addresses on Neutron networks/subnets.  This implements the spec"},{"line_number":11,"context_line":"proposed at https://review.openstack.org/#/c/180803/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_0ab0a742","line":11,"updated":"2015-08-18 00:23:34.000000000","message":"imo, you should still add:\n\n  Implements: blueprint network-ip-usage-api\n  Closes-Bug: 1457986","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements an API extension for reporting usage statistcis of IP"},{"line_number":10,"context_line":"addresses on Neutron networks/subnets.  This implements the spec"},{"line_number":11,"context_line":"proposed at https://review.openstack.org/#/c/180803/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_36af5f7e","line":11,"in_reply_to":"fa1b9901_0ab0a742","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Development credit goes to David Bingham and Craig Jellick."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"APIImpact"},{"line_number":31,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_6a81234a","line":28,"updated":"2015-08-18 00:23:34.000000000","message":"Use instead:\n\n Co-Authored-By: name \u003cname@example.com\u003e","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Development credit goes to David Bingham and Craig Jellick."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"APIImpact"},{"line_number":31,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_56b213e6","line":28,"in_reply_to":"fa1b9901_6a81234a","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add API extension for reporting IP address usage statistics"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements an API extension for reporting usage statistcis of IP"},{"line_number":10,"context_line":"addresses on Neutron networks/subnets.  This implements the spec"},{"line_number":11,"context_line":"proposed at https://review.openstack.org/#/c/180803/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_f2e62614","line":10,"updated":"2015-10-31 08:42:58.000000000","message":"The last sentence is redondant with \"Implements: blueprint network-ip-usage-api\"","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add API extension for reporting IP address usage statistics"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements an API extension for reporting usage statistcis of IP"},{"line_number":10,"context_line":"addresses on Neutron networks/subnets.  This implements the spec"},{"line_number":11,"context_line":"proposed at https://review.openstack.org/#/c/180803/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_4cb3bee9","line":10,"in_reply_to":"1a26ad4f_f2e62614","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"},{"line_number":15,"context_line":"subnets.  Many operators have a requirement for this usage data"},{"line_number":16,"context_line":"in order to make scheduling decisions, monitoring, triggers"},{"line_number":17,"context_line":"for scaling, etc."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_f21f0606","line":15,"updated":"2015-10-31 08:42:58.000000000","message":"Provide no useful information in order to understand the change (should be only in the BP/bug description)","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"},{"line_number":15,"context_line":"subnets.  Many operators have a requirement for this usage data"},{"line_number":16,"context_line":"in order to make scheduling decisions, monitoring, triggers"},{"line_number":17,"context_line":"for scaling, etc."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_0ccaa64e","line":15,"in_reply_to":"1a26ad4f_f21f0606","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"for scaling, etc."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"After discussions at the Neutron mid-cycle meeting in June 2015,"},{"line_number":20,"context_line":"it was suggested this extension may be accepted in-tree without"},{"line_number":21,"context_line":"a spec.  So here it is."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"This is a direct patch of the extension we\u0027ve been using internally"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_7233f6ab","line":20,"updated":"2015-10-31 08:42:58.000000000","message":"Provide no useful information in order to understand the change (should be only in the BP/bug description)","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"for scaling, etc."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"After discussions at the Neutron mid-cycle meeting in June 2015,"},{"line_number":20,"context_line":"it was suggested this extension may be accepted in-tree without"},{"line_number":21,"context_line":"a spec.  So here it is."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"This is a direct patch of the extension we\u0027ve been using internally"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_acc29232","line":20,"in_reply_to":"1a26ad4f_7233f6ab","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"a spec.  So here it is."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"This is a direct patch of the extension we\u0027ve been using internally"},{"line_number":24,"context_line":"at Go Daddy since Icehouse.  We currently have it running in Kilo,"},{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_522efa43","line":24,"updated":"2015-10-31 08:42:58.000000000","message":"Provide no useful information in order to understand the change (should be only in the BP/bug description)","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":21,"context_line":"a spec.  So here it is."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"This is a direct patch of the extension we\u0027ve been using internally"},{"line_number":24,"context_line":"at Go Daddy since Icehouse.  We currently have it running in Kilo,"},{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_ccbfcea8","line":24,"in_reply_to":"1a26ad4f_522efa43","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Development credit goes to David Bingham and Craig Jellick."},{"line_number":29,"context_line":"Co-Authored-By: David Bingham \u003cdbingham@godaddy.com\u003e"},{"line_number":30,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_72da164e","line":28,"updated":"2015-10-31 08:42:58.000000000","message":"Redondant with Co-Authored-By tags","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"and not specifically tested in Liberty (other than the CI tests"},{"line_number":26,"context_line":"in this review.)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Development credit goes to David Bingham and Craig Jellick."},{"line_number":29,"context_line":"Co-Authored-By: David Bingham \u003cdbingham@godaddy.com\u003e"},{"line_number":30,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a26ad4f_6cdf9a0d","line":28,"in_reply_to":"1a26ad4f_72da164e","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c26f0980dea6aa3b6d98e07f2c3c106a37289e64","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"APIImpact"},{"line_number":21,"context_line":"DocImpact"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements: blueprint network-ip-usage-api"},{"line_number":24,"context_line":"Closes-Bug: 1457986"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7a740942_88f91250","line":21,"updated":"2015-12-04 01:15:16.000000000","message":"Please follow guidelines as detailed here:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-November/080294.html\n\n\"you will need to add a description whenever you add a DocImpact flag in your commit message.\"","commit_id":"40f1d9b704b758f38dee6d30129fd0abaf2f12d5"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"},{"line_number":15,"context_line":"subnets."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: David Bingham \u003cdbingham@godaddy.com\u003e"},{"line_number":18,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_a02aae2a","line":15,"updated":"2016-01-20 06:38:43.000000000","message":"Can only query IP availability via networks not subnet.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"cf68125a06cc9165838408a479680db5bde05a89","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"},{"line_number":15,"context_line":"subnets."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: David Bingham \u003cdbingham@godaddy.com\u003e"},{"line_number":18,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"9a68dd71_ca304d59","line":15,"in_reply_to":"9a68dd71_7f46e5c0","updated":"2016-01-21 08:31:23.000000000","message":"Statement \"all networks and/or subnets\" made me feel like we can even query by subnets.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This provides an easy way for operators to count the number of"},{"line_number":14,"context_line":"used and total IP addresses on any or all networks and/or"},{"line_number":15,"context_line":"subnets."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: David Bingham \u003cdbingham@godaddy.com\u003e"},{"line_number":18,"context_line":"Co-Authored-By: Craig Jellick \u003ccraig.jellick@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"9a68dd71_7f46e5c0","line":15,"in_reply_to":"ba63e191_a02aae2a","updated":"2016-01-20 22:59:44.000000000","message":"This line infers that you will get a response with \"number of used and total IP addresses\". This API returns these values at both the network and subnet levels. It makes no mention of querying by subnet.\n\nIs querying by subnet a feature you are wanting?","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"}],"doc/source/devref/network_ip_availability.rst":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"824d08e8e8a96b900e14932715c25e1912d32b06","unresolved":false,"context_lines":[{"line_number":21,"context_line":"      (Avoid deeper levels because they do not render well.)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Network Ip Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only api that allows a user or process"}],"source_content_type":"text/x-rst","patch_set":16,"id":"ba63e191_15f97a4d","line":24,"updated":"2016-01-20 06:07:23.000000000","message":"%s/Ip/IP/g","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":21,"context_line":"      (Avoid deeper levels because they do not render well.)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Network Ip Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only api that allows a user or process"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9a68dd71_5fe521a6","line":24,"in_reply_to":"ba63e191_15f97a4d","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"824d08e8e8a96b900e14932715c25e1912d32b06","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Network Ip Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only api that allows a user or process"},{"line_number":28,"context_line":"to determine the amount of IPs that are consumed across networks and"},{"line_number":29,"context_line":"their subnets\u0027 allocation pools. Each network and embedded subnet returns"},{"line_number":30,"context_line":"with values for **used_ips** and **total_ips** making it easy"}],"source_content_type":"text/x-rst","patch_set":16,"id":"ba63e191_75a0f643","line":27,"updated":"2016-01-20 06:07:23.000000000","message":"%s/api/API/g","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Network Ip Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only api that allows a user or process"},{"line_number":28,"context_line":"to determine the amount of IPs that are consumed across networks and"},{"line_number":29,"context_line":"their subnets\u0027 allocation pools. Each network and embedded subnet returns"},{"line_number":30,"context_line":"with values for **used_ips** and **total_ips** making it easy"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9a68dd71_9f02b93d","line":27,"in_reply_to":"ba63e191_75a0f643","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c650ef708490d33b289bf275b59e38795c5802e4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"      under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"      Convention for heading levels in Neutron devref:"},{"line_number":16,"context_line":"      \u003d\u003d\u003d\u003d\u003d\u003d\u003d  Heading 0 (reserved for the title in a document)"},{"line_number":17,"context_line":"      -------  Heading 1"},{"line_number":18,"context_line":"      ~~~~~~~  Heading 2"}],"source_content_type":"text/x-rst","patch_set":18,"id":"9a68dd71_85b77a85","line":15,"range":{"start_line":15,"start_character":17,"end_line":15,"end_character":20},"updated":"2016-01-21 23:33:15.000000000","message":"to remove?","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":12,"context_line":"      under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"      Convention for heading levels in Neutron devref:"},{"line_number":16,"context_line":"      \u003d\u003d\u003d\u003d\u003d\u003d\u003d  Heading 0 (reserved for the title in a document)"},{"line_number":17,"context_line":"      -------  Heading 1"},{"line_number":18,"context_line":"      ~~~~~~~  Heading 2"}],"source_content_type":"text/x-rst","patch_set":18,"id":"9a68dd71_80f448f2","line":15,"range":{"start_line":15,"start_character":17,"end_line":15,"end_character":20},"in_reply_to":"9a68dd71_85b77a85","updated":"2016-02-03 03:41:29.000000000","message":"This heading was cloned from other devref docs.\n\nAre you wanting me to remove this whole section? In anticipation of \u0027yes\u0027 answer, I\u0027ve removed the whole \"Convention section\". If this is should have stayed, I\u0027d be glad to add it back.","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fc331aaddde517a71992d5fbc81e69d52afcf061","unresolved":false,"context_lines":[{"line_number":21,"context_line":"      (Avoid deeper levels because they do not render well.)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Network IP Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only API that allows a user or process"}],"source_content_type":"text/x-rst","patch_set":18,"id":"9a68dd71_219add6e","line":24,"range":{"start_line":24,"start_character":11,"end_line":24,"end_character":23},"updated":"2016-01-25 08:05:32.000000000","message":"this needs an entry in the index.rst file","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":21,"context_line":"      (Avoid deeper levels because they do not render well.)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Network IP Availability Extension"},{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This extension is an information-only API that allows a user or process"}],"source_content_type":"text/x-rst","patch_set":18,"id":"7a5de9d1_30c0be4f","line":24,"range":{"start_line":24,"start_character":11,"end_line":24,"end_character":23},"in_reply_to":"9a68dd71_219add6e","updated":"2016-02-03 03:41:29.000000000","message":"Done","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9f943aedbb403c68170978ad0511a75993096ece","unresolved":false,"context_lines":[{"line_number":36,"context_line":"Example"},{"line_number":37,"context_line":"::"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    service_plugins\u003dneutron.services.l3_router.l3_router_plugin.L3RouterPlugin, neutron.services.network_ip_availability.plugin.NetworkIPAvailabilityPlugin"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"API Specification"}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_f262c915","line":39,"updated":"2016-02-25 21:09:55.000000000","message":"This line is tooooo long. Moreover commonly we use stevedore entrypoints to avoid mistakes:\n\n service_plugins \u003d router, ???\n\n\u003d\u003e you should add an endpoint for this service plugin in the setup.cfg","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"4106b40b27344c93e006fc602998d15a2347ee3a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"Example"},{"line_number":37,"context_line":"::"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    service_plugins\u003dneutron.services.l3_router.l3_router_plugin.L3RouterPlugin, neutron.services.network_ip_availability.plugin.NetworkIPAvailabilityPlugin"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"API Specification"}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_666a761c","line":39,"in_reply_to":"9aed3d3a_f262c915","updated":"2016-02-26 00:34:42.000000000","message":"Done","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9f943aedbb403c68170978ad0511a75993096ece","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"::"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    curl -i -k -H \u0027Content-Type: application/json\u0027 -H \"X-Auth-Token: SOME_AUTH_TOKEN\" https://neutron-dev:9696/v2.0/network-ip-availabilities"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"GET /v2.0/network-ip-availabilities"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_cded6827","line":52,"updated":"2016-02-25 21:09:55.000000000","message":"The example provides no useful information","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"4106b40b27344c93e006fc602998d15a2347ee3a","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"::"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    curl -i -k -H \u0027Content-Type: application/json\u0027 -H \"X-Auth-Token: SOME_AUTH_TOKEN\" https://neutron-dev:9696/v2.0/network-ip-availabilities"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"GET /v2.0/network-ip-availabilities"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_d71a1217","line":52,"in_reply_to":"9aed3d3a_cded6827","updated":"2016-02-26 00:34:42.000000000","message":"Done. Curl example gone.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9f943aedbb403c68170978ad0511a75993096ece","unresolved":false,"context_lines":[{"line_number":66,"context_line":"      HTTP/1.1 200 OK"},{"line_number":67,"context_line":"      Content-Type: application/json; charset\u003dUTF-8"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":".. code:: javascript"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    {"},{"line_number":72,"context_line":"        \"network_ip_availabilities\": ["}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_2d20549b","line":69,"range":{"start_line":69,"start_character":10,"end_line":69,"end_character":20},"updated":"2016-02-25 21:09:55.000000000","message":"javascript? It\u0027s confusing","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"4106b40b27344c93e006fc602998d15a2347ee3a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"      HTTP/1.1 200 OK"},{"line_number":67,"context_line":"      Content-Type: application/json; charset\u003dUTF-8"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":".. code:: javascript"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    {"},{"line_number":72,"context_line":"        \"network_ip_availabilities\": ["}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_d7e7b23e","line":69,"range":{"start_line":69,"start_character":10,"end_line":69,"end_character":20},"in_reply_to":"9aed3d3a_2d20549b","updated":"2016-02-26 00:34:42.000000000","message":"I wasn\u0027t sure what language lexers we have behind our rst page generators to do language syntax highlighting. Since javascript does will with json, I chose this as the language. Do you have a better recommendation for json that OpenStack rst parsers have enabled? Also, since this does not display after rendered, does it harm leaving it?\n\nI can remove it (default what I\u0027ll do in next patch) ... or ... set it whatever is recommended (if I get a response).","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9f943aedbb403c68170978ad0511a75993096ece","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"::"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    curl -i -k -H \u0027Content-Type: application/json\u0027 -H \"X-Auth-Token: SOME_AUTH_TOKEN\" https://neutron-dev:9696/v2.0/network-ip-availabilities/2d5fe344-4e98-4ccc-8c91-b8064d17c64c"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"GET /v2.0/network-ip-availabilities/{network\\_uuid}"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_2d57b403","line":125,"updated":"2016-02-25 21:09:55.000000000","message":"IMO, this line is tooo long and L127 is enough","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"4106b40b27344c93e006fc602998d15a2347ee3a","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"::"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    curl -i -k -H \u0027Content-Type: application/json\u0027 -H \"X-Auth-Token: SOME_AUTH_TOKEN\" https://neutron-dev:9696/v2.0/network-ip-availabilities/2d5fe344-4e98-4ccc-8c91-b8064d17c64c"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"GET /v2.0/network-ip-availabilities/{network\\_uuid}"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"9aed3d3a_17bc7a6b","line":125,"in_reply_to":"9aed3d3a_2d57b403","updated":"2016-02-26 00:34:42.000000000","message":"Done. Curl example gone (as I did to the above curl example).","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"30ccc2031de2530a7bd2607f99c55365f92c65aa","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                ],"},{"line_number":114,"context_line":"                \"tenant_id\": \"test-tenant\","},{"line_number":115,"context_line":"                \"total_ips\": 253,"},{"line_number":116,"context_line":"                \"used_ips\": 2"},{"line_number":117,"context_line":"            }"},{"line_number":118,"context_line":"        ]"},{"line_number":119,"context_line":"    }"}],"source_content_type":"text/x-rst","patch_set":22,"id":"9aed3d3a_3b2b5b84","line":116,"updated":"2016-02-26 04:22:53.000000000","message":"if you redo another patch I think showing free_ips or available_ips (doing the math for users) woudl be beneficial.","commit_id":"a43126bdf010bf13966f922615da218f70203079"}],"neutron/db/ip_usage_db.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#  See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"#  limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from netaddr import iprange_to_cidrs"},{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.db.models_v2 import IPAllocation"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_aa0adbd0","line":17,"updated":"2015-08-18 00:23:34.000000000","message":"only import modules","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#  See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"#  limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from netaddr import iprange_to_cidrs"},{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.db.models_v2 import IPAllocation"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_16c9fb58","line":17,"in_reply_to":"fa1b9901_aa0adbd0","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def _construct_usage_dict(self, subnet_id, used_ips):"},{"line_number":28,"context_line":"        return {\u0027subnet_id\u0027: subnet_id,"},{"line_number":29,"context_line":"                \u0027used_ips\u0027: used_ips}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_subnet_ip_usage(self, context, network_id\u003dNone):"},{"line_number":32,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_4afe9f6c","line":29,"updated":"2015-08-18 00:23:34.000000000","message":"why not defining total_ips?","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def _construct_usage_dict(self, subnet_id, used_ips):"},{"line_number":28,"context_line":"        return {\u0027subnet_id\u0027: subnet_id,"},{"line_number":29,"context_line":"                \u0027used_ips\u0027: used_ips}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_subnet_ip_usage(self, context, network_id\u003dNone):"},{"line_number":32,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_76e077cd","line":29,"in_reply_to":"fa1b9901_4afe9f6c","updated":"2015-08-21 04:25:12.000000000","message":"Good point.  I think we can here, and eliminate some logic below.  I want dbingham to review this though.","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                \u0027used_ips\u0027: used_ips}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_subnet_ip_usage(self, context, network_id\u003dNone):"},{"line_number":32,"context_line":"        \"\"\""},{"line_number":33,"context_line":"        Get IP usage stats on a per subnet basis."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        Returns a dictionary where key is subnet id and value is a"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_aa309b57","line":32,"updated":"2015-08-18 00:23:34.000000000","message":"docstring title should on L32 not L33","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                \u0027used_ips\u0027: used_ips}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_subnet_ip_usage(self, context, network_id\u003dNone):"},{"line_number":32,"context_line":"        \"\"\""},{"line_number":33,"context_line":"        Get IP usage stats on a per subnet basis."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        Returns a dictionary where key is subnet id and value is a"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_96e3cbd8","line":32,"in_reply_to":"fa1b9901_aa309b57","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        pools \u003d pool_query.all()"},{"line_number":55,"context_line":"        for pool in pools:"},{"line_number":56,"context_line":"            cidrs \u003d iprange_to_cidrs(pool.first_ip, pool.last_ip)"},{"line_number":57,"context_line":"            size \u003d 0"},{"line_number":58,"context_line":"            for cidr in cidrs:"},{"line_number":59,"context_line":"                size \u003d size + cidr.size"},{"line_number":60,"context_line":"            if pool.subnet_id not in subnet_usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_eac5335b","line":57,"updated":"2015-08-18 00:23:34.000000000","message":"more pythonic:\n\n  size \u003d sum(cidr.size for cidr in cidrs)","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        pools \u003d pool_query.all()"},{"line_number":55,"context_line":"        for pool in pools:"},{"line_number":56,"context_line":"            cidrs \u003d iprange_to_cidrs(pool.first_ip, pool.last_ip)"},{"line_number":57,"context_line":"            size \u003d 0"},{"line_number":58,"context_line":"            for cidr in cidrs:"},{"line_number":59,"context_line":"                size \u003d size + cidr.size"},{"line_number":60,"context_line":"            if pool.subnet_id not in subnet_usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_36e67fe8","line":57,"in_reply_to":"fa1b9901_eac5335b","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3f187e2121cfcb2a063c8bfbedf871a3608b8d06","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            subnet_usage[result.subnet_id] \u003d self._construct_usage_dict("},{"line_number":51,"context_line":"                result.subnet_id, result.used_ips)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        pool_query \u003d context.session.query(IPAllocationPool)"},{"line_number":54,"context_line":"        pools \u003d pool_query.all()"},{"line_number":55,"context_line":"        for pool in pools:"},{"line_number":56,"context_line":"            cidrs \u003d netaddr.iprange_to_cidrs(pool.first_ip, pool.last_ip)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b9e826b4","line":53,"updated":"2015-08-21 14:11:19.000000000","message":"it seems incorrect to add pool usage when network_id !\u003d None","commit_id":"592de10d6c7d14bad067418d94880309c78d2827"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"562501aa86f11135bf54eba7a476f9ae9c3a1784","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            subnet_usage[result.subnet_id] \u003d self._construct_usage_dict("},{"line_number":51,"context_line":"                result.subnet_id, result.used_ips)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        pool_query \u003d context.session.query(IPAllocationPool)"},{"line_number":54,"context_line":"        pools \u003d pool_query.all()"},{"line_number":55,"context_line":"        for pool in pools:"},{"line_number":56,"context_line":"            cidrs \u003d netaddr.iprange_to_cidrs(pool.first_ip, pool.last_ip)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_6824f20b","line":53,"in_reply_to":"fa1b9901_b9e826b4","updated":"2015-08-21 15:37:28.000000000","message":"I believe this is so we capture usage info for subnets which have no used ips (meaning the above query would not return any info for that subnet.)","commit_id":"592de10d6c7d14bad067418d94880309c78d2827"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"38350d24a43c549be5aadcdecddb455969380fed","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_50a79ebc","line":1,"updated":"2015-09-24 03:15:06.000000000","message":"I don\u0027t think we should this kind of Copyright title","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"773cc8fdc400a98aea8e8d560ae5d6ff6abfca90","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_0663e4b2","line":1,"in_reply_to":"9a1a9d01_1df2539b","updated":"2015-09-24 15:08:09.000000000","message":"Done","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"e65f46941012b766e15e467ed3e92570e7e5c1ec","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_9da46ea6","line":1,"in_reply_to":"ba15a1d1_2b007f00","updated":"2015-09-24 04:38:34.000000000","message":"# Copyright 2015 OpenStack Foundation.","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"ea1843b35265944e255b0a03c41699f11a7766c3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_2b007f00","line":1,"in_reply_to":"ba15a1d1_50a79ebc","updated":"2015-09-24 03:27:23.000000000","message":"There are many other instances of these in the codebase.  What did you have in mind?","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"f28df32acd254d1cc9c35f6b6dcfa607cb8eb0f7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_1df2539b","line":1,"in_reply_to":"ba15a1d1_9da46ea6","updated":"2015-09-24 14:23:52.000000000","message":"gongysh: imho, this copyright is perfectly acceptable (other than the year) - see https://wiki.openstack.org/wiki/LegalIssuesFAQ","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":18445,"name":"Aihua Edward Li","email":"aihuaedwardli@yahoo.com","username":"aihuaedwardli"},"change_message_id":"ee13893f1c69d4469f51ddb970aaa8f1aaf19c4c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def _construct_usage_dict(self, subnet_id, used_ips):"},{"line_number":28,"context_line":"        return {\u0027subnet_id\u0027: subnet_id,"},{"line_number":29,"context_line":"                \u0027used_ips\u0027: used_ips,"},{"line_number":30,"context_line":"                \u0027total_ips\u0027: 0}"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def get_subnet_ip_usage(self, context, network_id\u003dNone):"},{"line_number":33,"context_line":"        \"\"\"Get IP usage stats on a per subnet basis."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_a5dfc138","line":30,"updated":"2015-10-17 03:09:43.000000000","message":"self is not used, this function should be a stand-alone function.\n\nfurther reading on the entire class, both functions are utility functions for read-only db opertion, it is not necessary for them to be under a class. \n\nFrom decoupling from db operation, these function should stay more inside network_ip_usage/plugin.py","commit_id":"07024a7fdde762212b5ff2fdee21b930a149e8c2"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def get_network_ip_allocations(context, filters\u003dNone):"},{"line_number":42,"context_line":"        \"\"\"Get IP usage stats on a per subnet basis."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        Returns a list of network summaries which which contain a dictionary"},{"line_number":45,"context_line":"        of subnet summaries whose key is the subnet_id."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_5dce18b5","line":44,"updated":"2015-10-30 15:53:02.000000000","message":"Duplicated which","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def get_network_ip_allocations(context, filters\u003dNone):"},{"line_number":42,"context_line":"        \"\"\"Get IP usage stats on a per subnet basis."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        Returns a list of network summaries which which contain a dictionary"},{"line_number":45,"context_line":"        of subnet summaries whose key is the subnet_id."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_972d64aa","line":44,"in_reply_to":"1a26ad4f_5dce18b5","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        of subnet summaries whose key is the subnet_id."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Query all data wanted tolerant of emtpy subnet, alloc or pool"},{"line_number":49,"context_line":"        query \u003d context.session\\"},{"line_number":50,"context_line":"            .query(mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":51,"context_line":"                   mod.Network.name.label(\u0027network_name\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_7dd19456","line":48,"updated":"2015-10-30 15:53:02.000000000","message":"Typo - empty. Please rewrite that comment because I can\u0027t understand it completely.","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        of subnet summaries whose key is the subnet_id."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Query all data wanted tolerant of emtpy subnet, alloc or pool"},{"line_number":49,"context_line":"        query \u003d context.session\\"},{"line_number":50,"context_line":"            .query(mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":51,"context_line":"                   mod.Network.name.label(\u0027network_name\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_b72ae08e","line":48,"in_reply_to":"1a26ad4f_7dd19456","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import six"},{"line_number":19,"context_line":"from sqlalchemy import func"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_log import log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_f2a2a698","line":21,"updated":"2015-10-31 08:42:58.000000000","message":"to group with previous imports","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \u0027network_name\u0027: mod.Network.name,"},{"line_number":32,"context_line":"    \u0027ip_version\u0027: mod.Subnet.ip_version,"},{"line_number":33,"context_line":"}"},{"line_number":34,"context_line":"SUPPORTED_FILTER_KEYS \u003d six.viewkeys(SUPPORTED_FILTERS)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class IpUsageMixin(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_1297223b","line":34,"updated":"2015-10-31 08:42:58.000000000","message":"According to L97, what you really need is a set of SUPPORTED_FILTERS keys\n\nIMO, six reduces readibility so it should be used when need","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \u0027network_name\u0027: mod.Network.name,"},{"line_number":32,"context_line":"    \u0027ip_version\u0027: mod.Subnet.ip_version,"},{"line_number":33,"context_line":"}"},{"line_number":34,"context_line":"SUPPORTED_FILTER_KEYS \u003d six.viewkeys(SUPPORTED_FILTERS)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class IpUsageMixin(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_9d1ee3b9","line":34,"in_reply_to":"1a26ad4f_1297223b","updated":"2015-10-31 22:59:13.000000000","message":"I guess I am playing it safe when it comes to portability. This function does produce a \u0027set\u0027 of keys from this dictionary.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \"\"\"Mixin class to query for IP usage.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    @staticmethod"},{"line_number":41,"context_line":"    def get_network_ip_allocations(context, filters\u003dNone):"},{"line_number":42,"context_line":"        \"\"\"Get IP usage stats on a per subnet basis."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        Returns a list of network summaries which contain a dictionary"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_f2c9465a","line":41,"updated":"2015-10-31 08:42:58.000000000","message":"IMO, this method should be splitted at least in 2 methods: one building/performing db queries, one parsing db results. It will simply unittests","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # Generate a query to gather all information."},{"line_number":49,"context_line":"        # Ensure query is tolerant of missing child table data (outerjoins)"},{"line_number":50,"context_line":"        # Process these outerjoin columns assuming their values may be None"},{"line_number":51,"context_line":"        query \u003d context.session\\"},{"line_number":52,"context_line":"            .query(mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":53,"context_line":"                   mod.Network.name.label(\u0027network_name\u0027),"},{"line_number":54,"context_line":"                   mod.Subnet.id.label(\u0027subnet_id\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_32b7bef6","line":51,"updated":"2015-10-31 08:42:58.000000000","message":"Use () instead of \\ to handle line continuation","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # Generate a query to gather all information."},{"line_number":49,"context_line":"        # Ensure query is tolerant of missing child table data (outerjoins)"},{"line_number":50,"context_line":"        # Process these outerjoin columns assuming their values may be None"},{"line_number":51,"context_line":"        query \u003d context.session\\"},{"line_number":52,"context_line":"            .query(mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":53,"context_line":"                   mod.Network.name.label(\u0027network_name\u0027),"},{"line_number":54,"context_line":"                   mod.Subnet.id.label(\u0027subnet_id\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_dd28dbe4","line":51,"in_reply_to":"1a26ad4f_32b7bef6","updated":"2015-10-31 22:59:13.000000000","message":"I tried in various ways but kept as is. This query is easy to read and looks a lot like the SQL it would generate.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocation.subnet_id)\\"},{"line_number":64,"context_line":"            .outerjoin(mod.IPAllocationPool,"},{"line_number":65,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocationPool.subnet_id)\\"},{"line_number":66,"context_line":"            .group_by(mod.IPAllocation.subnet_id)\\"},{"line_number":67,"context_line":"            .order_by(mod.Network.id, mod.Subnet.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_12a96290","line":66,"updated":"2015-10-31 08:42:58.000000000","message":"According to effective neutron doc[1], it doesn\u0027t seem postgres compliant\n\n[1] https://github.com/openstack/neutron/blob/master/doc/source/devref/effective_neutron.rst#database-interaction","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocation.subnet_id)\\"},{"line_number":64,"context_line":"            .outerjoin(mod.IPAllocationPool,"},{"line_number":65,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocationPool.subnet_id)\\"},{"line_number":66,"context_line":"            .group_by(mod.IPAllocation.subnet_id)\\"},{"line_number":67,"context_line":"            .order_by(mod.Network.id, mod.Subnet.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_fd3ef726","line":66,"in_reply_to":"1a26ad4f_12a96290","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            .order_by(mod.Network.id, mod.Subnet.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"},{"line_number":70,"context_line":"        query \u003d IpUsageMixin._adjust_query_for_filters(query, filters)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_d2d0ca21","line":70,"updated":"2015-10-31 08:42:58.000000000","message":"Transform the staticmethod into a classmethod and use:\n\n query \u003d cls._adjust...\n\nIt allows subclasses to overload _adjust...","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            .order_by(mod.Network.id, mod.Subnet.id)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"},{"line_number":70,"context_line":"        query \u003d IpUsageMixin._adjust_query_for_filters(query, filters)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_fdc35787","line":70,"in_reply_to":"1a26ad4f_d2d0ca21","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"},{"line_number":70,"context_line":"        query \u003d IpUsageMixin._adjust_query_for_filters(query, filters)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Assemble result knowing \"order by\" groups networks together"},{"line_number":75,"context_line":"        net_ip_usages \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_f2cdc685","line":72,"updated":"2015-10-31 08:42:58.000000000","message":"use:\n\n LOG.debug(\u0027...\u0027, query)","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # Apply filters directly to query (if applicable)"},{"line_number":70,"context_line":"        query \u003d IpUsageMixin._adjust_query_for_filters(query, filters)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Assemble result knowing \"order by\" groups networks together"},{"line_number":75,"context_line":"        net_ip_usages \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_dd41bbaa","line":72,"in_reply_to":"1a26ad4f_f2cdc685","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Assemble result knowing \"order by\" groups networks together"},{"line_number":75,"context_line":"        net_ip_usages \u003d []"},{"line_number":76,"context_line":"        curr_network \u003d None"},{"line_number":77,"context_line":"        prev_net_id \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_32b33eeb","line":74,"updated":"2015-10-31 08:42:58.000000000","message":"it seems you can use itertools.group_by to do such grouping","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        LOG.debug(\u0027Usage query generated: %s\u0027 % query)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # Assemble result knowing \"order by\" groups networks together"},{"line_number":75,"context_line":"        net_ip_usages \u003d []"},{"line_number":76,"context_line":"        curr_network \u003d None"},{"line_number":77,"context_line":"        prev_net_id \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_9d74a336","line":74,"in_reply_to":"1a26ad4f_32b33eeb","updated":"2015-10-31 22:59:13.000000000","message":"I used a different technique to assemble the results and thus was able to remove the \"order_by\" in the query.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                net_ip_usages.append(curr_network)"},{"line_number":88,"context_line":"                prev_net_id \u003d row.network_id"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            IpUsageMixin._add_subnet_data_to_net(row, curr_network)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        return net_ip_usages"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_52dfda0c","line":90,"updated":"2015-10-31 08:42:58.000000000","message":"itto","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                net_ip_usages.append(curr_network)"},{"line_number":88,"context_line":"                prev_net_id \u003d row.network_id"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            IpUsageMixin._add_subnet_data_to_net(row, curr_network)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        return net_ip_usages"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_5d7b6bf5","line":90,"in_reply_to":"1a26ad4f_52dfda0c","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    @staticmethod"},{"line_number":95,"context_line":"    def _adjust_query_for_filters(query, filters):"},{"line_number":96,"context_line":"        # The intersect of sets gets us applicable filter keys"},{"line_number":97,"context_line":"        common_keys \u003d six.viewkeys(filters) \u0026 SUPPORTED_FILTER_KEYS"},{"line_number":98,"context_line":"        for key in common_keys:"},{"line_number":99,"context_line":"            # TODO(wwriverrat) consider \u0027or\u0027 when we get more than one in list"},{"line_number":100,"context_line":"            # Example: (network_id\u003d\u0027xxxx\u0027 or network_id\u003d\u0027yyyy\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_329c9e5c","line":97,"updated":"2015-10-31 08:42:58.000000000","message":"what you really need is a set intersection","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    @staticmethod"},{"line_number":95,"context_line":"    def _adjust_query_for_filters(query, filters):"},{"line_number":96,"context_line":"        # The intersect of sets gets us applicable filter keys"},{"line_number":97,"context_line":"        common_keys \u003d six.viewkeys(filters) \u0026 SUPPORTED_FILTER_KEYS"},{"line_number":98,"context_line":"        for key in common_keys:"},{"line_number":99,"context_line":"            # TODO(wwriverrat) consider \u0027or\u0027 when we get more than one in list"},{"line_number":100,"context_line":"            # Example: (network_id\u003d\u0027xxxx\u0027 or network_id\u003d\u0027yyyy\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_9de58339","line":97,"in_reply_to":"1a26ad4f_329c9e5c","updated":"2015-10-31 22:59:13.000000000","message":"Yes. six.view_keys produces a set of the filter keys and SUPPORTED_FILTER_KEYS is a set. The \u0026 operator gives the intersection.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            elif isinstance(filter_vals, six.string_types):"},{"line_number":106,"context_line":"                single_val \u003d filter_vals"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"            if single_val:"},{"line_number":109,"context_line":"                query \u003d query.filter("},{"line_number":110,"context_line":"                    SUPPORTED_FILTERS[key] \u003d\u003d single_val)"},{"line_number":111,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_72e456e0","line":108,"updated":"2015-10-31 08:42:58.000000000","message":"this test can be avoided","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            elif isinstance(filter_vals, six.string_types):"},{"line_number":106,"context_line":"                single_val \u003d filter_vals"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"            if single_val:"},{"line_number":109,"context_line":"                query \u003d query.filter("},{"line_number":110,"context_line":"                    SUPPORTED_FILTERS[key] \u003d\u003d single_val)"},{"line_number":111,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_5dd28b5d","line":108,"in_reply_to":"1a26ad4f_72e456e0","updated":"2015-10-31 22:59:13.000000000","message":"So if I pass in a query something like this:  \"?version_id\u003d\" (i.e. no value), wouldn\u0027t this check prevent this query from blowing up? Am I able to assume somewhere in the filter processing this type of empty query parameter is taken out for me?","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            total_ips \u003d netaddr.IPRange(netaddr.IPAddress(db_row.first_ip),"},{"line_number":132,"context_line":"                                        netaddr.IPAddress(db_row.last_ip)).size"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            total_ips \u003d netaddr.IPNetwork(db_row.cidr,"},{"line_number":135,"context_line":"                                          version\u003ddb_row.ip_version).size"},{"line_number":136,"context_line":"        subnet[\u0027total_ips\u0027] \u003d total_ips"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_b2d66eef","line":134,"updated":"2015-10-31 08:42:58.000000000","message":"It counts every ip in the network even network/broadcast ip which seems incorrect","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            total_ips \u003d netaddr.IPRange(netaddr.IPAddress(db_row.first_ip),"},{"line_number":132,"context_line":"                                        netaddr.IPAddress(db_row.last_ip)).size"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            total_ips \u003d netaddr.IPNetwork(db_row.cidr,"},{"line_number":135,"context_line":"                                          version\u003ddb_row.ip_version).size"},{"line_number":136,"context_line":"        subnet[\u0027total_ips\u0027] \u003d total_ips"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_fdc9175a","line":134,"in_reply_to":"1a26ad4f_b2d66eef","updated":"2015-10-31 22:59:13.000000000","message":"I guess if the implementation adds ports for broadcast IP and/or gateway IP, then the count could will be off.\n\nRandom thoughts:\n\n1. Use cidr as overall size. Drawbacks are that not all drivers push the \"reserved\" ip into the range as ports (showing more IP than there really are)\n\n2. Somehow filtering out allocations serving as utility ports.\n\n3. Somehow tell sql to ignore allocations to ignore rows ip\u003cfirst_ip and ip\u003elast_ip. This seems dubious because sql wont know how to parse ips from strings and compare\n\n4. I dont want to do the grossly inefficient technique of loading all ports and counting them if their IPs are within the range.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"}],"neutron/db/network_ip_availability_db.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"824d08e8e8a96b900e14932715c25e1912d32b06","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_55adb22f","line":1,"updated":"2016-01-20 06:07:23.000000000","message":"2016 ;)","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_dfb5917e","line":1,"in_reply_to":"ba63e191_55adb22f","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"56fcd11b167d364b5023af9f0626e3ecd6388ad3","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_164feb6b","line":22,"updated":"2016-01-14 18:42:15.000000000","message":"one too many new lines","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_c64033a8","line":22,"in_reply_to":"da6ed579_164feb6b","updated":"2016-01-19 22:05:01.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"56fcd11b167d364b5023af9f0626e3ecd6388ad3","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"SUPPORTED_FILTERS \u003d {"},{"line_number":28,"context_line":"    \u0027network_id\u0027: mod.Network.id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_9643db41","line":25,"updated":"2016-01-14 18:42:15.000000000","message":"ditto","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"SUPPORTED_FILTERS \u003d {"},{"line_number":28,"context_line":"    \u0027network_id\u0027: mod.Network.id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_e63bf736","line":25,"in_reply_to":"da6ed579_9643db41","updated":"2016-01-19 22:05:01.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    data_columns \u003d ["},{"line_number":40,"context_line":"        mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":41,"context_line":"        mod.Network.name.label(\u0027network_name\u0027),"},{"line_number":42,"context_line":"        mod.Network.tenant_id,"},{"line_number":43,"context_line":"        mod.Subnet.id.label(\u0027subnet_id\u0027),"},{"line_number":44,"context_line":"        mod.Subnet.name.label(\u0027subnet_name\u0027),"},{"line_number":45,"context_line":"        mod.Subnet.ip_version,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_bb75ff98","line":42,"updated":"2016-01-20 06:38:43.000000000","message":"Let\u0027s move tenant_id and the top for better readability","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    data_columns \u003d ["},{"line_number":40,"context_line":"        mod.Network.id.label(\u0027network_id\u0027),"},{"line_number":41,"context_line":"        mod.Network.name.label(\u0027network_name\u0027),"},{"line_number":42,"context_line":"        mod.Network.tenant_id,"},{"line_number":43,"context_line":"        mod.Subnet.id.label(\u0027subnet_id\u0027),"},{"line_number":44,"context_line":"        mod.Subnet.name.label(\u0027subnet_name\u0027),"},{"line_number":45,"context_line":"        mod.Subnet.ip_version,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_8217c2ec","line":42,"in_reply_to":"ba63e191_bb75ff98","updated":"2016-01-20 22:59:44.000000000","message":"The order of this is irrelevant because the data is not served up in this order (see _add_subnet_data_to_net). I ordered these \"model\" things to keep them grouped by the DB tables they are taken from (networks, subnets, ipallocationpools). Another reason I hesitate to change this order is because the outer join data from subnets and ipallocationpools is not guaranteed (typically during network setup before subnet is allocated). That means all fields from first \"mod.Subnet\" down may not be populated.\n\nGoing to keep the order as is and grouped by their tables.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        mod.Network.tenant_id,"},{"line_number":43,"context_line":"        mod.Subnet.id.label(\u0027subnet_id\u0027),"},{"line_number":44,"context_line":"        mod.Subnet.name.label(\u0027subnet_name\u0027),"},{"line_number":45,"context_line":"        mod.Subnet.ip_version,"},{"line_number":46,"context_line":"        mod.Subnet.cidr,"},{"line_number":47,"context_line":"        mod.IPAllocationPool.first_ip.label(\u0027first_ip\u0027),"},{"line_number":48,"context_line":"        mod.IPAllocationPool.last_ip.label(\u0027last_ip\u0027)]"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_3b6a6fb4","line":45,"updated":"2016-01-20 06:38:43.000000000","message":"Let\u0027s move this at the top","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        mod.Network.tenant_id,"},{"line_number":43,"context_line":"        mod.Subnet.id.label(\u0027subnet_id\u0027),"},{"line_number":44,"context_line":"        mod.Subnet.name.label(\u0027subnet_name\u0027),"},{"line_number":45,"context_line":"        mod.Subnet.ip_version,"},{"line_number":46,"context_line":"        mod.Subnet.cidr,"},{"line_number":47,"context_line":"        mod.IPAllocationPool.first_ip.label(\u0027first_ip\u0027),"},{"line_number":48,"context_line":"        mod.IPAllocationPool.last_ip.label(\u0027last_ip\u0027)]"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_e2dc7e48","line":45,"in_reply_to":"ba63e191_3b6a6fb4","updated":"2016-01-20 22:59:44.000000000","message":"ditto previous comment ^^","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            network \u003d {\u0027id\u0027: db_row.network_id, \u0027name\u0027: db_row.network_name,"},{"line_number":117,"context_line":"                       \u0027tenant_id\u0027: db_row.tenant_id,"},{"line_number":118,"context_line":"                       \u0027subnet_ip_availability\u0027: [], \u0027used_ips\u0027: 0,"},{"line_number":119,"context_line":"                       \u0027total_ips\u0027: 0}"},{"line_number":120,"context_line":"            result_dict[db_row.network_id] \u003d network"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_e093c64d","line":118,"updated":"2016-01-20 06:38:43.000000000","message":"Let\u0027s put \u0027used_ips\u0027 on the next line.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            network \u003d {\u0027id\u0027: db_row.network_id, \u0027name\u0027: db_row.network_name,"},{"line_number":117,"context_line":"                       \u0027tenant_id\u0027: db_row.tenant_id,"},{"line_number":118,"context_line":"                       \u0027subnet_ip_availability\u0027: [], \u0027used_ips\u0027: 0,"},{"line_number":119,"context_line":"                       \u0027total_ips\u0027: 0}"},{"line_number":120,"context_line":"            result_dict[db_row.network_id] \u003d network"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_8246e2bd","line":118,"in_reply_to":"ba63e191_e093c64d","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # IPAllocationsPool information (i.e. value \u003d None)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # Skip rows without subnet data"},{"line_number":134,"context_line":"        if not db_row.subnet_id:"},{"line_number":135,"context_line":"            return"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_40ddf2de","line":134,"range":{"start_line":134,"start_character":19,"end_line":134,"end_character":20},"updated":"2016-01-20 06:38:43.000000000","message":"This looks un-necssary. Plz check we already validate subnet_id in L123 and then make a call to _add_subnet_data_to_net","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # IPAllocationsPool information (i.e. value \u003d None)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # Skip rows without subnet data"},{"line_number":134,"context_line":"        if not db_row.subnet_id:"},{"line_number":135,"context_line":"            return"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_c274dad0","line":134,"range":{"start_line":134,"start_character":19,"end_line":134,"end_character":20},"in_reply_to":"ba63e191_40ddf2de","updated":"2016-01-20 22:59:44.000000000","message":"Good catch. Going to do a little different lines 122-126 and also removing this check:\n\n        # Only add rows with subnet data\n        if db_row.subnet_id:\n            cls._add_subnet_data_to_net(db_row, network)","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c650ef708490d33b289bf275b59e38795c5802e4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        both levels."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        query \u003d cls._build_query(context, filters)"},{"line_number":60,"context_line":"        LOG.debug(\u0027Availability query generated: %s\u0027, query)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # Assemble result"},{"line_number":63,"context_line":"        result_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a68dd71_85453a71","line":60,"range":{"start_line":60,"start_character":38,"end_line":60,"end_character":47},"updated":"2016-01-21 23:33:15.000000000","message":"I don\u0027t see the added value of logging an sqlalchemy object","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        both levels."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        query \u003d cls._build_query(context, filters)"},{"line_number":60,"context_line":"        LOG.debug(\u0027Availability query generated: %s\u0027, query)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # Assemble result"},{"line_number":63,"context_line":"        result_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_108b4220","line":60,"range":{"start_line":60,"start_character":38,"end_line":60,"end_character":47},"in_reply_to":"9a68dd71_3f4456b5","updated":"2016-02-03 03:41:29.000000000","message":"Done.\n\nHad query logging so I could visually verify query built had correct columns as well as filters. Going away now. May temporarily come back (temporarily) if/when we add support for \u0027fields\u0027 in the future.","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"26c5fee9920a931b624eae17039b602a2934ce14","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        both levels."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        query \u003d cls._build_query(context, filters)"},{"line_number":60,"context_line":"        LOG.debug(\u0027Availability query generated: %s\u0027, query)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # Assemble result"},{"line_number":63,"context_line":"        result_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a68dd71_3f4456b5","line":60,"range":{"start_line":60,"start_character":38,"end_line":60,"end_character":47},"in_reply_to":"9a68dd71_85453a71","updated":"2016-01-23 04:46:32.000000000","message":"+1","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Assemble result"},{"line_number":62,"context_line":"        result_dict \u003d {}"},{"line_number":63,"context_line":"        for row in query.all():"},{"line_number":64,"context_line":"            cls._add_result(result_dict, row)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Convert result back into the list it expects"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_65639db2","line":63,"updated":"2016-02-10 12:16:04.000000000","message":"nit. If you just do \"for row in query\" it will iterate over the result set as well.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Assemble result"},{"line_number":62,"context_line":"        result_dict \u003d {}"},{"line_number":63,"context_line":"        for row in query.all():"},{"line_number":64,"context_line":"            cls._add_result(result_dict, row)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Convert result back into the list it expects"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_1a731482","line":63,"in_reply_to":"3a57f1b5_65639db2","updated":"2016-02-22 21:13:35.000000000","message":"Done","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        return cls._adjust_query_for_filters(query, filters)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @classmethod"},{"line_number":89,"context_line":"    def _adjust_query_for_filters(cls, query, filters):"},{"line_number":90,"context_line":"        # The intersect of sets gets us applicable filter keys"},{"line_number":91,"context_line":"        common_keys \u003d six.viewkeys(filters) \u0026 SUPPORTED_FILTER_KEYS"},{"line_number":92,"context_line":"        for key in common_keys:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_a54675bd","line":89,"updated":"2016-02-10 12:16:04.000000000","message":"I seem to recall that the neutron framework has facilities for parsing query parameters and pushing them as lists to the plugins.\nWeren\u0027t you able to leverage this?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        return cls._adjust_query_for_filters(query, filters)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @classmethod"},{"line_number":89,"context_line":"    def _adjust_query_for_filters(cls, query, filters):"},{"line_number":90,"context_line":"        # The intersect of sets gets us applicable filter keys"},{"line_number":91,"context_line":"        common_keys \u003d six.viewkeys(filters) \u0026 SUPPORTED_FILTER_KEYS"},{"line_number":92,"context_line":"        for key in common_keys:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_869b8317","line":89,"in_reply_to":"3a57f1b5_a54675bd","updated":"2016-02-22 21:13:35.000000000","message":"Yeah, the params are already parsed by the time we get here as a dict. This was attempt at applying the filters to the query. Next patch is MUCH cleaner and values are assumed to be a in the form of a list (thanks to your hint elsewhere in this review).","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                       \u0027tenant_id\u0027: db_row.tenant_id,"},{"line_number":115,"context_line":"                       \u0027subnet_ip_availability\u0027: [],"},{"line_number":116,"context_line":"                       \u0027used_ips\u0027: 0, \u0027total_ips\u0027: 0}"},{"line_number":117,"context_line":"            result_dict[db_row.network_id] \u003d network"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Only add subnet data if outerjoin rows have it"},{"line_number":120,"context_line":"        if db_row.subnet_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_252b6532","line":117,"updated":"2016-02-10 12:16:04.000000000","message":"The logic is ok but it could have been simplified with setdefault in my opinion","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                       \u0027tenant_id\u0027: db_row.tenant_id,"},{"line_number":115,"context_line":"                       \u0027subnet_ip_availability\u0027: [],"},{"line_number":116,"context_line":"                       \u0027used_ips\u0027: 0, \u0027total_ips\u0027: 0}"},{"line_number":117,"context_line":"            result_dict[db_row.network_id] \u003d network"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Only add subnet data if outerjoin rows have it"},{"line_number":120,"context_line":"        if db_row.subnet_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_c12295a2","line":117,"in_reply_to":"3a57f1b5_252b6532","updated":"2016-02-22 21:13:35.000000000","message":"I\u0027m at a quandary on this one. I implemented the setdefault and it is much prettier and more concise.\n\nMy reservation is the small expense of building the network dict to pass into setdefault just to have it discarded when the key exists. This would occur for every 2nd+ subnet for each network.\n\nI\u0027m leaning toward pre-testing (as-is), but could be swayed either way.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # Handle missing IPAllocationPool data"},{"line_number":133,"context_line":"        if db_row.last_ip:"},{"line_number":134,"context_line":"            total_ips \u003d netaddr.IPRange(netaddr.IPAddress(db_row.first_ip),"},{"line_number":135,"context_line":"                                        netaddr.IPAddress(db_row.last_ip)).size"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            total_ips \u003d netaddr.IPNetwork(db_row.cidr,"},{"line_number":138,"context_line":"                                          version\u003ddb_row.ip_version).size"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_a573d54c","line":135,"updated":"2016-02-10 12:16:04.000000000","message":"I\u0027m not sure this also handles the case where a subnet has multiple allocation pools.\nAlso, Neutron does not forbid allocation outside the pool... the pool is simply used for automatic ip generation.\nDo you think the addresses which are not in the pool but still not used should be considered as part of total_ips?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # Handle missing IPAllocationPool data"},{"line_number":133,"context_line":"        if db_row.last_ip:"},{"line_number":134,"context_line":"            total_ips \u003d netaddr.IPRange(netaddr.IPAddress(db_row.first_ip),"},{"line_number":135,"context_line":"                                        netaddr.IPAddress(db_row.last_ip)).size"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            total_ips \u003d netaddr.IPNetwork(db_row.cidr,"},{"line_number":138,"context_line":"                                          version\u003ddb_row.ip_version).size"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_e10b597b","line":135,"in_reply_to":"3a57f1b5_a573d54c","updated":"2016-02-22 21:13:35.000000000","message":"Answering: \"not sure this also handles the case where a subnet has multiple allocation pools\": Good catch! I\u0027ve modified my patch to acquire the subnet totals in a separate query. Done\n\n\nAnswering: \"Neutron does not forbid allocation outside the pool\" and \"Do you think the addresses which are not in the pool but still not used should be considered as part of total_ips\"\n\n\nThere seems to be 4 concepts here (2 for used, 2 for total):\n* 1: used count of ALL IPs (includes gateway, reserved, etc)\n* 2: used count of consumable IPs (excludes gateway, reserved, etc)\n* 3: total count of ALL IPs (includes gateway, reserved, etc)\n* 4: total count of consumable IPs (excludes gateway, reserved, etc)\n\n#1 and #3 refer to theoretical max limits while #2 and #4 refer to that which can be consumed in day-to-day operations.\n\nThis patch behaves by returning #2 \u0026 #4 cases because we\u0027re ultimately wanting to answer the question: \"When will networks/subnets run out?\"\n\n\nSo, I could leave patch as-is?\n\n... or ...\n\nReturn the following as part of subnet and network information (relatively easy):\n* used_ips \u003d used_consumable_ips + (total_ips - total_consumable_ips).\n* used_consumable_ips \u003d count of all in IPAllocation (for a given subnet or network)\n* total_ips \u003d sum of all subnet cidr.size\n* total_consumable_ips \u003d sum of all of the ranges between first_ip and last_ips in IPAllocationPools\n\nKnowing percent consumption would then become: used_consumable_ips / total_consumable_ips * 100%\n\n\nBear in mind, our goal is to ultimately know \"how close are we to running out of IP resources\"","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"074ea13ec18bd3ae49521f861cbc41c197a45b2c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # Handle missing IPAllocationPool data"},{"line_number":133,"context_line":"        if db_row.last_ip:"},{"line_number":134,"context_line":"            total_ips \u003d netaddr.IPRange(netaddr.IPAddress(db_row.first_ip),"},{"line_number":135,"context_line":"                                        netaddr.IPAddress(db_row.last_ip)).size"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            total_ips \u003d netaddr.IPNetwork(db_row.cidr,"},{"line_number":138,"context_line":"                                          version\u003ddb_row.ip_version).size"}],"source_content_type":"text/x-python","patch_set":19,"id":"bae84128_078bdc1f","line":135,"in_reply_to":"dae33548_e10b597b","updated":"2016-02-24 10:31:52.000000000","message":"Regarding the 2nd part of your reply I reckon it is fine to leave it as it is. The way most operations work appear to assume that whatever is not is in an application pool is \"reserved\" indeed.\n\nWhile that\u0027s not the case, it is probably the way in which the API is commonly used so it\u0027s ok to return counts of \"consumable\" IPs.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"SUPPORTED_FILTER_KEYS \u003d six.viewkeys(SUPPORTED_FILTERS)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class IpAvailabilityMixin(object):"},{"line_number":35,"context_line":"    \"\"\"Mixin class to query for IP availability.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Columns common to all queries"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_adfdb1b2","line":34,"updated":"2016-02-24 11:44:41.000000000","message":"I would give a thought about not making this a class at all... You\u0027ve implemented only class methods, meaning that probably you have been using the class construct just because it\u0027s used so extensively in neutron.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"SUPPORTED_FILTER_KEYS \u003d six.viewkeys(SUPPORTED_FILTERS)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class IpAvailabilityMixin(object):"},{"line_number":35,"context_line":"    \"\"\"Mixin class to query for IP availability.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Columns common to all queries"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_4c1f955b","line":34,"in_reply_to":"bae84128_adfdb1b2","updated":"2016-02-25 01:16:01.000000000","message":"I figure it could be extended if someone wanted to override some if its behavior. (Plus I shamelessly prefer OO classes even if they do behave statically like non-class code).","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"d7117dd0f6d09573fcc238eaf35adaee986beaf7","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def _build_total_ips_query(cls, context, filters):"},{"line_number":100,"context_line":"        query \u003d context.session.query()\\"},{"line_number":101,"context_line":"            .add_columns(*cls.total_ips_columns)\\"},{"line_number":102,"context_line":"            .outerjoin(mod.Subnet, mod.Network.id \u003d\u003d mod.Subnet.network_id,)\\"},{"line_number":103,"context_line":"            .outerjoin(mod.IPAllocationPool,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_f1cdf266","line":100,"updated":"2016-02-23 21:52:57.000000000","message":"\\\u0027s shouldn\u0027t be used.  you can do newline breaks inside a parentheses.  like:\n\nquery \u003d context.session.query().add_columns(\n    *cls.total_ips_columns).outerjoin(\n    mod.Subnet(...","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def _build_total_ips_query(cls, context, filters):"},{"line_number":100,"context_line":"        query \u003d context.session.query()\\"},{"line_number":101,"context_line":"            .add_columns(*cls.total_ips_columns)\\"},{"line_number":102,"context_line":"            .outerjoin(mod.Subnet, mod.Network.id \u003d\u003d mod.Subnet.network_id,)\\"},{"line_number":103,"context_line":"            .outerjoin(mod.IPAllocationPool,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_4cf68e5d","line":100,"in_reply_to":"bae84128_8ab2534a","updated":"2016-02-25 01:16:01.000000000","message":"When I wrote this, I struggled with making function chained queries read cleanly and have it look similar to its SQL counterpart. I was trying to preserve some semblance with the query it originated from. Neater? Shrug. I haven\u0027t had much luck making that many chained functions read very cleanly.\n\nGoing to change it doesn\u0027t make future reviewers cringe at the sight of a harmless little \\  :-)","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def _build_total_ips_query(cls, context, filters):"},{"line_number":100,"context_line":"        query \u003d context.session.query()\\"},{"line_number":101,"context_line":"            .add_columns(*cls.total_ips_columns)\\"},{"line_number":102,"context_line":"            .outerjoin(mod.Subnet, mod.Network.id \u003d\u003d mod.Subnet.network_id,)\\"},{"line_number":103,"context_line":"            .outerjoin(mod.IPAllocationPool,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_8ab2534a","line":100,"in_reply_to":"bae84128_f1cdf266","updated":"2016-02-24 11:44:41.000000000","message":"While the style Brandon suggests is a lot neater imho, I was at fault once of point this out without noticing that there\u0027s actually no style rule enforcing this for OpenStack.\n\nAfaict the pep8 job implements enforcement for all required code conventions","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        query \u003d context.session.query()\\"},{"line_number":101,"context_line":"            .add_columns(*cls.total_ips_columns)\\"},{"line_number":102,"context_line":"            .outerjoin(mod.Subnet, mod.Network.id \u003d\u003d mod.Subnet.network_id,)\\"},{"line_number":103,"context_line":"            .outerjoin(mod.IPAllocationPool,"},{"line_number":104,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocationPool.subnet_id)"},{"line_number":105,"context_line":"        return cls._adjust_query_for_filters(query, filters)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_4d59858d","line":103,"updated":"2016-02-24 11:44:41.000000000","message":"Did I already ask why are you using outerjoin? This will lead to null values for cases such as networks without subnets, that you indeed skip in _generate_subnet_total_ips_dict","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        query \u003d context.session.query()\\"},{"line_number":101,"context_line":"            .add_columns(*cls.total_ips_columns)\\"},{"line_number":102,"context_line":"            .outerjoin(mod.Subnet, mod.Network.id \u003d\u003d mod.Subnet.network_id,)\\"},{"line_number":103,"context_line":"            .outerjoin(mod.IPAllocationPool,"},{"line_number":104,"context_line":"                       mod.Subnet.id \u003d\u003d mod.IPAllocationPool.subnet_id)"},{"line_number":105,"context_line":"        return cls._adjust_query_for_filters(query, filters)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_ac1c61c2","line":103,"in_reply_to":"bae84128_4d59858d","updated":"2016-02-25 01:16:01.000000000","message":"You haven\u0027t asked, but I fully expect either subnet, ipallocatons and/or ipallocationpools to possibly be null in all the DB calls.  Our internal implementation blew up badly when someone defined a new network but had not yet added a subnet to it. Since then, I\u0027ve learned to be tolerant of that case. If you look elsewhere in this code (lines 156 and 166), you\u0027ll see tolerance added to add_result and _add_subnet_data_to_net.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"3ebf75f266a55412f6144486ef52aeb8af07f443","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    ]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Columns for the network/subnet and used_ip counts"},{"line_number":51,"context_line":"    network_used_ips_columns \u003d list(common_columns)"},{"line_number":52,"context_line":"    network_used_ips_columns.append(mod.Network.name.label(NETWORK_NAME))"},{"line_number":53,"context_line":"    network_used_ips_columns.append(mod.Network.tenant_id)"},{"line_number":54,"context_line":"    network_used_ips_columns.append(mod.Subnet.name.label(SUBNET_NAME))"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_d14f8cbb","line":51,"updated":"2016-02-26 16:03:15.000000000","message":"Why we got to convert a list to list again?","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"9289124831838abf3c9a612d1cb8ae3c40783bb6","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    ]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Columns for the network/subnet and used_ip counts"},{"line_number":51,"context_line":"    network_used_ips_columns \u003d list(common_columns)"},{"line_number":52,"context_line":"    network_used_ips_columns.append(mod.Network.name.label(NETWORK_NAME))"},{"line_number":53,"context_line":"    network_used_ips_columns.append(mod.Network.tenant_id)"},{"line_number":54,"context_line":"    network_used_ips_columns.append(mod.Subnet.name.label(SUBNET_NAME))"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_0016bfa6","line":51,"in_reply_to":"9aed3d3a_d14f8cbb","updated":"2016-02-26 17:44:15.000000000","message":"Not converting to a list, but cloning the \"common\" list into a new list. I want to preserve the original.","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"3ebf75f266a55412f6144486ef52aeb8af07f443","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        func.count(mod.IPAllocation.subnet_id).label(\u0027used_ips\u0027)]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    # Columns for total_ips query"},{"line_number":60,"context_line":"    total_ips_columns \u003d list(common_columns)"},{"line_number":61,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.first_ip)"},{"line_number":62,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.last_ip)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_31d518b9","line":60,"updated":"2016-02-26 16:03:15.000000000","message":"ditto","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"9289124831838abf3c9a612d1cb8ae3c40783bb6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        func.count(mod.IPAllocation.subnet_id).label(\u0027used_ips\u0027)]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    # Columns for total_ips query"},{"line_number":60,"context_line":"    total_ips_columns \u003d list(common_columns)"},{"line_number":61,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.first_ip)"},{"line_number":62,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.last_ip)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_4010c7a8","line":60,"in_reply_to":"9aed3d3a_31d518b9","updated":"2016-02-26 17:44:15.000000000","message":"ditto","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d3abb49d0b4f3d2deff5c25776e4608ae12043c2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_f07a0ebc","line":20,"updated":"2016-03-01 02:29:32.000000000","message":"nit: why not \u0027from neutron.db import models_v2\u0027?","commit_id":"2f741ca5f9545c388270ddab774e9e030b006d8a"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"58dfeead0737fb8d48148fcafc960a56cf41535d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_9c5ab9f0","line":20,"in_reply_to":"9aed3d3a_f07a0ebc","updated":"2016-03-02 19:45:33.000000000","message":"Was looking for a semi-short alias to make some of the references below succinct and and fit nicely when used. However, models_v2 could also work and better show its roots. Who knows, maybe someday we\u0027ll be a models_v4 and this would be the only line needing changed. However I could be swayed either way.","commit_id":"2f741ca5f9545c388270ddab774e9e030b006d8a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d3abb49d0b4f3d2deff5c25776e4608ae12043c2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_10e05295","line":21,"updated":"2016-03-01 02:29:32.000000000","message":"nit: L.21 should be in a group of L.16-18. (if you have a chance to respin this, update it)","commit_id":"2f741ca5f9545c388270ddab774e9e030b006d8a"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"58dfeead0737fb8d48148fcafc960a56cf41535d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from sqlalchemy import func"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import neutron.db.models_v2 as mod"},{"line_number":21,"context_line":"import oslo_log.log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_fc230554","line":21,"in_reply_to":"9aed3d3a_10e05295","updated":"2016-03-02 19:45:33.000000000","message":"doh!  You\u0027re right. Next spin will organized properly.","commit_id":"2f741ca5f9545c388270ddab774e9e030b006d8a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"484b36c6385643076e31af06a8e1bde28d10a469","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.first_ip)"},{"line_number":62,"context_line":"    total_ips_columns.append(mod.IPAllocationPool.last_ip)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def get_network_ip_availabilities(cls, context, filters\u003dNone):"},{"line_number":66,"context_line":"        \"\"\"Get IP availability stats on a per subnet basis."},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_ec3249a6","line":64,"updated":"2016-02-29 20:06:58.000000000","message":"Is there a reason all of these were done with class methods? Just curious because this pattern isn\u0027t followed anywhere else in the Neutron DB for mixins. All of this methods are actually called from an instance (the plugin that inherits this), but the mixin completely loses the reference to the instance...","commit_id":"2f741ca5f9545c388270ddab774e9e030b006d8a"}],"neutron/extensions/network_ip_availability.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"824d08e8e8a96b900e14932715c25e1912d32b06","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_9571eae2","line":1,"updated":"2016-01-20 06:07:23.000000000","message":"2016","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_224a9684","line":1,"in_reply_to":"ba63e191_9571eae2","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import neutron.api.v2.attributes as attributes"},{"line_number":20,"context_line":"import neutron.api.v2.base as base"},{"line_number":21,"context_line":"import neutron.common.constants as constants"},{"line_number":22,"context_line":"from neutron.i18n import _"},{"line_number":23,"context_line":"import neutron.services.network_ip_availability.plugin as plugin"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_1bb68b3d","line":22,"updated":"2016-01-20 06:38:43.000000000","message":"import from neutron._i18n","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import neutron.api.v2.attributes as attributes"},{"line_number":20,"context_line":"import neutron.api.v2.base as base"},{"line_number":21,"context_line":"import neutron.common.constants as constants"},{"line_number":22,"context_line":"from neutron.i18n import _"},{"line_number":23,"context_line":"import neutron.services.network_ip_availability.plugin as plugin"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_df25915c","line":22,"in_reply_to":"ba63e191_1bb68b3d","updated":"2016-01-20 22:59:44.000000000","message":"When I remove the 2 fixes \"name is not translated\" garyk mentioned below, this import will be removed altogether.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"00ba98e5d5af96858b762ed7e0f4a2ba9391dfd6","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \"network_ip_availability\""},{"line_number":28,"context_line":"RESOURCE_PLURAL \u003d \"network_ip_availabilities\""},{"line_number":29,"context_line":"COLLECTION_NAME \u003d RESOURCE_PLURAL.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":30,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_fc085fdb","line":28,"updated":"2016-01-19 23:11:03.000000000","message":"i don\u0027t think this will need a plural as it won\u0027t be a plural.  Plus the spec specifically stated it would be\n\n/v2.0/network-ip-availability\n\nSo to stay with the spec, you shouldn\u0027t need the RESOURE_PLURAL, just use RESOURCE_NAME\n\nhttps://review.openstack.org/#/c/180803/8/specs/mitaka/network-ip-availability-api.rst","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"RESOURCE_NAME \u003d \"network_ip_availability\""},{"line_number":28,"context_line":"RESOURCE_PLURAL \u003d \"network_ip_availabilities\""},{"line_number":29,"context_line":"COLLECTION_NAME \u003d RESOURCE_PLURAL.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":30,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_8c42523d","line":28,"in_reply_to":"ba63e191_fc085fdb","updated":"2016-01-20 22:59:44.000000000","message":"The plugin as currently written supports plural (/v2.0/network-ip-availabilities) and singular form (/v2.0/network-ip-availabilities/{network-id}). The response plural form returns a *list* (network-ip-availabilities) of matching dicts, while the singular form returns a *single dict* (network-ip-availability) matching the requested network ID. \n\nThis was an attempt to be consistent with the /v2.0/networks/{network-id} endpoint.\n\nExamples of both: http://paste.openstack.org/show/484439/\n\nI guess there\u0027s two routes:\n* 1. Support for both singular and plural. Pros: consistent with existing APIs that support searching multiples as well as by ID. Cons: network-ip-availabilities is awkward and does not match spec.\n* 2. Remove support for singular. Pros: API would always return plural for network-ip-availability regardless of input. If so, does this mean we remove support for direct query by {network-id}? This was a BIG ask during spec review. Cons: Not consistent with other existing APIs.\n\nIs there a different term to distinguish singular vs plural?\n* network-ip-availability (singular or plural)\n* network-ip-availabilities (plural)\n* network-ip-availability-match (singular)\n* network-matched-ip-availability (singular)\n* other suggestions?\n\nI\u0027d be happy to implement either way. The short term effort to remove plurals will require somewhat of a refactor.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"56fcd11b167d364b5023af9f0626e3ecd6388ad3","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def get_name(cls):"},{"line_number":66,"context_line":"        return _(\"Network IP Availability\")"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_3689cf75","line":66,"updated":"2016-01-14 18:42:15.000000000","message":"in general this name is not tranlated","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def get_name(cls):"},{"line_number":66,"context_line":"        return _(\"Network IP Availability\")"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_6664e748","line":66,"in_reply_to":"da6ed579_3689cf75","updated":"2016-01-19 22:05:01.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def get_alias(cls):"},{"line_number":70,"context_line":"        return EXT_ALIAS"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def get_description(cls):"},{"line_number":74,"context_line":"        return _(\"Provides IP availability data for each network and subnet.\")"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_fdec2f2b","line":71,"updated":"2016-01-19 22:05:01.000000000","message":"Needs a get_namespace() method. Have fix locally. Will commit with review comment fixes.","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def get_alias(cls):"},{"line_number":70,"context_line":"        return EXT_ALIAS"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def get_description(cls):"},{"line_number":74,"context_line":"        return _(\"Provides IP availability data for each network and subnet.\")"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_bd81b391","line":71,"in_reply_to":"da6ed579_fdec2f2b","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"56fcd11b167d364b5023af9f0626e3ecd6388ad3","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def get_description(cls):"},{"line_number":74,"context_line":"        return _(\"Provides IP availability data for each network and subnet.\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"},{"line_number":77,"context_line":"    def get_updated(cls):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_568ec379","line":74,"updated":"2016-01-14 18:42:15.000000000","message":"ditto","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def get_description(cls):"},{"line_number":74,"context_line":"        return _(\"Provides IP availability data for each network and subnet.\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"},{"line_number":77,"context_line":"    def get_updated(cls):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_c6dcb3e6","line":74,"in_reply_to":"da6ed579_568ec379","updated":"2016-01-19 22:05:01.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"26c5fee9920a931b624eae17039b602a2934ce14","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        return \"Provides IP availability data for each network and subnet.\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"},{"line_number":77,"context_line":"    def get_namespace(cls):"},{"line_number":78,"context_line":"        # This is the XML namespace used for xml responses. It doesn\u0027t resolve"},{"line_number":79,"context_line":"        # and doesn\u0027t need to."},{"line_number":80,"context_line":"        return \"http://docs.openstack\" \\"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a68dd71_bf5cc67d","line":77,"updated":"2016-01-23 04:46:32.000000000","message":"This method is removed. no need to retain it.\n\nhttps://github.com/openstack/neutron/commit/ad1c7a35dec614a26de0a426950fa005df5f489d","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        return \"Provides IP availability data for each network and subnet.\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"},{"line_number":77,"context_line":"    def get_namespace(cls):"},{"line_number":78,"context_line":"        # This is the XML namespace used for xml responses. It doesn\u0027t resolve"},{"line_number":79,"context_line":"        # and doesn\u0027t need to."},{"line_number":80,"context_line":"        return \"http://docs.openstack\" \\"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_504d3ac2","line":77,"in_reply_to":"9a68dd71_bf5cc67d","updated":"2016-02-03 03:41:29.000000000","message":"Done.\n\nRemoved. Be careful if this gets back-ported to include it. When when I popped this patch into kilo, it blew up without it.","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c650ef708490d33b289bf275b59e38795c5802e4","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def get_resources(cls):"},{"line_number":89,"context_line":"        \"\"\"Returns Extended Resource for service type management.\"\"\""},{"line_number":90,"context_line":"        plural \u003d {RESOURCE_PLURAL: RESOURCE_NAME}"},{"line_number":91,"context_line":"        attributes.PLURALS.update(dict(plural))"},{"line_number":92,"context_line":"        resource_attributes \u003d RESOURCE_ATTRIBUTE_MAP[RESOURCE_PLURAL]"},{"line_number":93,"context_line":"        controller \u003d base.create_resource("},{"line_number":94,"context_line":"            RESOURCE_PLURAL,"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a68dd71_c519f289","line":91,"range":{"start_line":91,"start_character":34,"end_line":91,"end_character":38},"updated":"2016-01-21 23:33:15.000000000","message":"you can directly do:\n\n attributes.PLURALS[RESOURCE_PLURAL] \u003d RESOURCE_NAME","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def get_resources(cls):"},{"line_number":89,"context_line":"        \"\"\"Returns Extended Resource for service type management.\"\"\""},{"line_number":90,"context_line":"        plural \u003d {RESOURCE_PLURAL: RESOURCE_NAME}"},{"line_number":91,"context_line":"        attributes.PLURALS.update(dict(plural))"},{"line_number":92,"context_line":"        resource_attributes \u003d RESOURCE_ATTRIBUTE_MAP[RESOURCE_PLURAL]"},{"line_number":93,"context_line":"        controller \u003d base.create_resource("},{"line_number":94,"context_line":"            RESOURCE_PLURAL,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_1098221b","line":91,"range":{"start_line":91,"start_character":34,"end_line":91,"end_character":38},"in_reply_to":"9a68dd71_c519f289","updated":"2016-02-03 03:41:29.000000000","message":"Done","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":34,"context_line":"               \u0027validate\u0027: {\u0027type:regex\u0027: attributes.UUID_PATTERN},"},{"line_number":35,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":36,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":38,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":39,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_889fd05e","line":37,"updated":"2016-02-10 12:16:04.000000000","message":"I am not sure what this \u0027name\u0027 is (and if it is the network name then I\u0027m not sure what network_name and network_id are)","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":34,"context_line":"               \u0027validate\u0027: {\u0027type:regex\u0027: attributes.UUID_PATTERN},"},{"line_number":35,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":36,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":38,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":39,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_d7dc1748","line":37,"in_reply_to":"3a57f1b5_889fd05e","updated":"2016-02-22 21:13:35.000000000","message":"doh!\n\nQuestion: if the query parameter is network_id but the response has id, which should I keep? And... should the query parameter match that of the response (i.e. network_name and name respectively). I made the query param \"network_id\" because \"id\" is embedded both within network and subnet portions of the response (same for network_name). My attempt to prevent confusion when querying.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a7bfdda75bfdf4cde846362535af2c6c402e80bf","unresolved":false,"context_lines":[{"line_number":34,"context_line":"               \u0027validate\u0027: {\u0027type:regex\u0027: attributes.UUID_PATTERN},"},{"line_number":35,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":36,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":38,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":39,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":19,"id":"bae84128_9e3d71c6","line":37,"in_reply_to":"dae33548_d7dc1748","updated":"2016-02-24 11:41:15.000000000","message":"I think in this case the response might better return network_id, since otherwise \u0027id\u0027 might seem to identify a network_ip_availability resource which does not exist.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027used_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":44,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":45,"context_line":"        \u0027subnet_ip_availability\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":46,"context_line":"                                   \u0027is_visible\u0027: True},"},{"line_number":47,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":48,"context_line":"                       \u0027convert_to\u0027: attributes.convert_to_int,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [constants.IP_VERSION_4,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_c502913e","line":46,"updated":"2016-02-10 12:16:04.000000000","message":"is this a composite attribute? If yes for usability purposes in this case it might make sense to introduce a subresource.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027used_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":44,"context_line":"                     \u0027is_visible\u0027: True},"},{"line_number":45,"context_line":"        \u0027subnet_ip_availability\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":46,"context_line":"                                   \u0027is_visible\u0027: True},"},{"line_number":47,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":48,"context_line":"                       \u0027convert_to\u0027: attributes.convert_to_int,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [constants.IP_VERSION_4,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bae84128_9fdd3345","line":46,"in_reply_to":"3a57f1b5_c502913e","updated":"2016-02-22 21:13:35.000000000","message":"Was poking around other extensions to look for a decent subresource attribute example. Any favorite extensions you know that show a good subresource example?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":48,"context_line":"                       \u0027convert_to\u0027: attributes.convert_to_int,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [constants.IP_VERSION_4,"},{"line_number":50,"context_line":"                                                    constants.IP_VERSION_6]},"},{"line_number":51,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":52,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_a873ac4c","line":50,"updated":"2016-02-10 12:16:04.000000000","message":"I thought this was supposed to be part of the subnet information?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":48,"context_line":"                       \u0027convert_to\u0027: attributes.convert_to_int,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [constants.IP_VERSION_4,"},{"line_number":50,"context_line":"                                                    constants.IP_VERSION_6]},"},{"line_number":51,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":52,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_a1f1516d","line":50,"in_reply_to":"3a57f1b5_a873ac4c","updated":"2016-02-22 21:13:35.000000000","message":"It is. Will be part of the subresource mentioned above.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"e8570b919e64acc0bb115df43b4be588184cf100","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":54,"context_line":"                       \u0027is_visible\u0027: True}},"},{"line_number":55,"context_line":"        \u0027network_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True, \u0027default\u0027: \u0027\u0027,"},{"line_number":56,"context_line":"                         \u0027validate\u0027: {\u0027type:string\u0027: attributes.NAME_MAX_LEN},"},{"line_number":57,"context_line":"                         \u0027is_visible\u0027: True},"},{"line_number":58,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_efb0a8df","line":55,"updated":"2016-02-04 07:12:33.000000000","message":"AFAIU, we don\u0027t support create and update interface for this requirement. Then why we have \n\u0027allow_post\u0027: True,\n\u0027allow_put\u0027: True\n\nAm I missing something?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"791ead6345b1aff127863128efe0f416be62d25d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":54,"context_line":"                       \u0027is_visible\u0027: True}},"},{"line_number":55,"context_line":"        \u0027network_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True, \u0027default\u0027: \u0027\u0027,"},{"line_number":56,"context_line":"                         \u0027validate\u0027: {\u0027type:string\u0027: attributes.NAME_MAX_LEN},"},{"line_number":57,"context_line":"                         \u0027is_visible\u0027: True},"},{"line_number":58,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_8de6aab2","line":55,"in_reply_to":"5a5ae5dd_448c3a7f","updated":"2016-02-05 01:51:18.000000000","message":"Doh! Yep. Will change to false in next patch. Thx!","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"15bdaa8c54443af2072d754829152c644b33a1b2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":54,"context_line":"                       \u0027is_visible\u0027: True}},"},{"line_number":55,"context_line":"        \u0027network_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True, \u0027default\u0027: \u0027\u0027,"},{"line_number":56,"context_line":"                         \u0027validate\u0027: {\u0027type:string\u0027: attributes.NAME_MAX_LEN},"},{"line_number":57,"context_line":"                         \u0027is_visible\u0027: True},"},{"line_number":58,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_448c3a7f","line":55,"in_reply_to":"5a5ae5dd_efb0a8df","updated":"2016-02-04 09:43:10.000000000","message":"good catch vikram.  yeah this should all be read only.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":54,"context_line":"                       \u0027is_visible\u0027: True}},"},{"line_number":55,"context_line":"        \u0027network_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True, \u0027default\u0027: \u0027\u0027,"},{"line_number":56,"context_line":"                         \u0027validate\u0027: {\u0027type:string\u0027: attributes.NAME_MAX_LEN},"},{"line_number":57,"context_line":"                         \u0027is_visible\u0027: True},"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_e5d8edf1","line":56,"updated":"2016-02-10 12:16:04.000000000","message":"when you do that you can also get rid of the validatation attributes for all parameters then","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":54,"context_line":"                       \u0027is_visible\u0027: True}},"},{"line_number":55,"context_line":"        \u0027network_name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True, \u0027default\u0027: \u0027\u0027,"},{"line_number":56,"context_line":"                         \u0027validate\u0027: {\u0027type:string\u0027: attributes.NAME_MAX_LEN},"},{"line_number":57,"context_line":"                         \u0027is_visible\u0027: True},"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"dae33548_37a8e376","line":56,"in_reply_to":"3a57f1b5_e5d8edf1","updated":"2016-02-22 21:13:35.000000000","message":"I guess I made a foolish assumption about query parameter validation. This seems that it would only validate a POST body and not query params.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":31,"context_line":"    RESOURCE_PLURAL: {"},{"line_number":32,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":33,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":35,"context_line":"                 \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_7ef7cdd2","line":32,"updated":"2016-02-24 11:44:41.000000000","message":"as suggested in the previous patchset my personal preference would be to have network_id in the response.\n\nBut I have no strong objection to having \u0027id\u0027...","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":31,"context_line":"    RESOURCE_PLURAL: {"},{"line_number":32,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":33,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":35,"context_line":"                 \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_67572b26","line":32,"in_reply_to":"bae84128_7ef7cdd2","updated":"2016-02-25 01:16:01.000000000","message":"Going to go with network_id and network_name as you mentioned here and in previous review. There is no way to put/post a \"network-ip-availability\" as resource so therefore having \"network_\" in the response will clarify that this is a foreign key id from another resource.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":35,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":36,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":38,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":39,"context_line":"        \u0027total_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_cabd7b03","line":37,"updated":"2016-02-24 11:44:41.000000000","message":"Do you really need validation here?\nAnyway, it\u0027s not doing any harm, the validator will simply never be invoked.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":35,"context_line":"                 \u0027is_visible\u0027: True},"},{"line_number":36,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":38,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":39,"context_line":"        \u0027total_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_879a2f12","line":37,"in_reply_to":"bae84128_cabd7b03","updated":"2016-02-25 01:16:01.000000000","message":"You were right the first time: not needed. Will remove. Thought I removed all those :-|","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":38,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":39,"context_line":"        \u0027total_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":41,"context_line":"        \u0027used_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_d380928d","line":39,"updated":"2016-02-24 11:44:41.000000000","message":"an additional clarification: why are not total_ips and used_ips scoped by subnet? I think it might be for UX reasons and it makes completely sense.\n\nIf so, why not an attribute for available_ips as well? You know just to spare the client the hassle of either doing a subtraction or adding up availability for all the subnets. The cost in terms of extra payload and computation is quite negligible I think","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":37,"context_line":"                      \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":38,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":39,"context_line":"        \u0027total_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":40,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":41,"context_line":"        \u0027used_ips\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":42,"context_line":"                     \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_47994778","line":39,"in_reply_to":"bae84128_d380928d","updated":"2016-02-25 01:16:01.000000000","message":"They will ALSO be scoped by subnet when I figure out how to define the subnet \"subnet_ip_availability\" children below in the TODO.  This network based used and total counts are rollup sums from all of the child subnet sums. Ultimately I care a lot more about whether the network has the IPs.  When I add a new /20 subnet to the network, all other subnets could be pretty saturated, but there will capacity on this network.\n\n***Burning Question***: How might I describe here \u0027\u0027subnet_ip_availability\" (a list of subnet children) without making them a sub-resource and thus needing to support a unwanted endpoint like: /network-ip-availability/{network_id}/subnet-ip-availability/{subnet_id}. At least in first cut edition.\n\nIf you\u0027re curious about what the \u0027subnet-ip-availability\u0027 blob looks like: see: https://review.openstack.org/#/c/212955/20/doc/source/devref/network_ip_availability.rst","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"}],"neutron/extensions/network_ip_usage.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        return _(\"Provides IP usage data for each network and subnet.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_namespace(cls):"},{"line_number":63,"context_line":"        # This is the XML namespace used for xml responses. It doesn\u0027t resolve"},{"line_number":64,"context_line":"        # and doesn\u0027t need to."},{"line_number":65,"context_line":"        return \"http://docs.openstack\" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_4a20df9b","line":62,"updated":"2015-08-18 00:23:34.000000000","message":"it seems this method is no more needed","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        return _(\"Provides IP usage data for each network and subnet.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_namespace(cls):"},{"line_number":63,"context_line":"        # This is the XML namespace used for xml responses. It doesn\u0027t resolve"},{"line_number":64,"context_line":"        # and doesn\u0027t need to."},{"line_number":65,"context_line":"        return \"http://docs.openstack\" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_56e9b3b5","line":62,"in_reply_to":"fa1b9901_4a20df9b","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3f187e2121cfcb2a063c8bfbedf871a3608b8d06","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_997a0276","line":1,"updated":"2015-08-21 14:11:19.000000000","message":"2015 :)","commit_id":"592de10d6c7d14bad067418d94880309c78d2827"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"562501aa86f11135bf54eba7a476f9ae9c3a1784","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 GoDaddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_68d952f2","line":1,"in_reply_to":"fa1b9901_997a0276","updated":"2015-08-21 15:37:28.000000000","message":"Done","commit_id":"592de10d6c7d14bad067418d94880309c78d2827"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"38350d24a43c549be5aadcdecddb455969380fed","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_updated(cls):"},{"line_number":63,"context_line":"        return \"2014-09-16T00:00:00-00:00\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get_resources(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_f0959231","line":63,"updated":"2015-09-24 03:15:06.000000000","message":"Ok, it is a long long ago","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"773cc8fdc400a98aea8e8d560ae5d6ff6abfca90","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_updated(cls):"},{"line_number":63,"context_line":"        return \"2014-09-16T00:00:00-00:00\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get_resources(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_a6dc7847","line":63,"in_reply_to":"9a1a9d01_bd1007aa","updated":"2015-09-24 15:08:09.000000000","message":"Done","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"f28df32acd254d1cc9c35f6b6dcfa607cb8eb0f7","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_updated(cls):"},{"line_number":63,"context_line":"        return \"2014-09-16T00:00:00-00:00\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get_resources(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_bd1007aa","line":63,"in_reply_to":"ba15a1d1_eb536714","updated":"2015-09-24 14:23:52.000000000","message":"I\u0027d say only if you are respinning for something else","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"ea1843b35265944e255b0a03c41699f11a7766c3","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def get_updated(cls):"},{"line_number":63,"context_line":"        return \"2014-09-16T00:00:00-00:00\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get_resources(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_eb536714","line":63,"in_reply_to":"ba15a1d1_f0959231","updated":"2015-09-24 03:27:23.000000000","message":"Yes.  Happy to update this timestamp if folks think that is important.","commit_id":"69ea9fd0430e9a91f72017c4e6fda7800d1afc89"},{"author":{"_account_id":18445,"name":"Aihua Edward Li","email":"aihuaedwardli@yahoo.com","username":"aihuaedwardli"},"change_message_id":"ef100145780677ee7b9b94bbb2ab6b8c769c0fe8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def get_updated(cls):"},{"line_number":74,"context_line":"        return \"2015-09-24T00:00:00-00:00\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"},{"line_number":77,"context_line":"    def get_resources(cls):"},{"line_number":78,"context_line":"        \"\"\"Returns Extended Resource for service type management.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a26ad4f_faa3cb4d","line":75,"updated":"2015-10-27 21:54:51.000000000","message":"missing class methold \"get_namespace\", causing the extension not to load.","commit_id":"82488157ddbb40ef7627d8b2f533af14a1f77660"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class Network_ip_usage(extensions.ExtensionDescriptor):"},{"line_number":58,"context_line":"    @classmethod"},{"line_number":59,"context_line":"    def get_name(cls):"},{"line_number":60,"context_line":"        return _(\"Network IP Usage\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_5d2a982d","line":57,"updated":"2015-10-30 15:53:02.000000000","message":"Missing docstring","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class Network_ip_usage(extensions.ExtensionDescriptor):"},{"line_number":58,"context_line":"    @classmethod"},{"line_number":59,"context_line":"    def get_name(cls):"},{"line_number":60,"context_line":"        return _(\"Network IP Usage\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_771f686c","line":57,"in_reply_to":"1a26ad4f_5d2a982d","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_5206fa86","line":2,"updated":"2015-10-31 08:42:58.000000000","message":"According to dev guidelines[1], \"All Rights Reserved.\" should be removed\n\n[1] http://docs.openstack.org/developer/swift/development_guidelines.html#license-and-copyright","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_380c7d3a","line":2,"in_reply_to":"1a26ad4f_5206fa86","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.api import extensions"},{"line_number":20,"context_line":"from neutron.api.v2 import attributes as attribs"},{"line_number":21,"context_line":"from neutron.api.v2 import base"},{"line_number":22,"context_line":"from neutron.services.network_ip_usage.plugin import IpUsagePlugin"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_d2fa0a75","line":20,"updated":"2015-10-31 08:42:58.000000000","message":"I would prefer you use directly attributes as there is no name conflict","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.api import extensions"},{"line_number":20,"context_line":"from neutron.api.v2 import attributes as attribs"},{"line_number":21,"context_line":"from neutron.api.v2 import base"},{"line_number":22,"context_line":"from neutron.services.network_ip_usage.plugin import IpUsagePlugin"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_9da82322","line":20,"in_reply_to":"1a26ad4f_d2fa0a75","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.api import extensions"},{"line_number":20,"context_line":"from neutron.api.v2 import attributes as attribs"},{"line_number":21,"context_line":"from neutron.api.v2 import base"},{"line_number":22,"context_line":"from neutron.services.network_ip_usage.plugin import IpUsagePlugin"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_12fc0271","line":22,"updated":"2015-10-31 08:42:58.000000000","message":"Import only modules","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.api import extensions"},{"line_number":20,"context_line":"from neutron.api.v2 import attributes as attribs"},{"line_number":21,"context_line":"from neutron.api.v2 import base"},{"line_number":22,"context_line":"from neutron.services.network_ip_usage.plugin import IpUsagePlugin"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_9d04a318","line":22,"in_reply_to":"1a26ad4f_12fc0271","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"COLLECTION_NAME \u003d RESOURCE_PLURAL.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":29,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Attribute Map for network ip usage (read-only)"},{"line_number":32,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":33,"context_line":"    RESOURCE_PLURAL: {"},{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_b2ed0eb9","line":31,"updated":"2015-10-31 08:42:58.000000000","message":"useless comment?","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"COLLECTION_NAME \u003d RESOURCE_PLURAL.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":29,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME.replace(\u0027_\u0027, \u0027-\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Attribute Map for network ip usage (read-only)"},{"line_number":32,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":33,"context_line":"    RESOURCE_PLURAL: {"},{"line_number":34,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_bd015f08","line":31,"in_reply_to":"1a26ad4f_b2ed0eb9","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4c5d86a0ad52fc4c7f595de686938b61b010efce","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                  \u0027is_visible\u0027: True},"},{"line_number":44,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":45,"context_line":"                       \u0027convert_to\u0027: attribs.convert_to_int,"},{"line_number":46,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [4, 6]},"},{"line_number":47,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":48,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_3286dedb","line":46,"updated":"2015-10-31 08:48:32.000000000","message":"I would prefer we use neutron.common.constants.IP_VERSION_4/6","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                  \u0027is_visible\u0027: True},"},{"line_number":44,"context_line":"        \u0027ip_version\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":45,"context_line":"                       \u0027convert_to\u0027: attribs.convert_to_int,"},{"line_number":46,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027: [4, 6]},"},{"line_number":47,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":48,"context_line":"        \u0027network_id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":49,"context_line":"                       \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_18074119","line":46,"in_reply_to":"1a26ad4f_3286dedb","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"}],"neutron/services/network_ip_availability/plugin.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"824d08e8e8a96b900e14932715c25e1912d32b06","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_d51c4279","line":1,"updated":"2016-01-20 06:07:23.000000000","message":"2016","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"aa3082bc3f36757c07249e2c3a132a2d5c183790","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_329f3205","line":1,"in_reply_to":"ba63e191_d51c4279","updated":"2016-01-20 22:59:44.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fd5cfaa0a2ce464bfebd66014d5ffe7134685bf6","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def get_network_ip_availabilities(self, context, filters\u003dNone,"},{"line_number":41,"context_line":"                                      fields\u003dNone):"},{"line_number":42,"context_line":"        \"\"\"Returns ip availability data for a collection of networks.\"\"\""},{"line_number":43,"context_line":"        return super(NetworkIPAvailabilityPlugin, self)\\"},{"line_number":44,"context_line":"            .get_network_ip_availabilities(context, filters)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_2199807c","line":43,"updated":"2016-02-01 08:12:21.000000000","message":"instead of the \\, add a new line within the super parentheses, after the comma, to avoid the \\","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def get_network_ip_availabilities(self, context, filters\u003dNone,"},{"line_number":41,"context_line":"                                      fields\u003dNone):"},{"line_number":42,"context_line":"        \"\"\"Returns ip availability data for a collection of networks.\"\"\""},{"line_number":43,"context_line":"        return super(NetworkIPAvailabilityPlugin, self)\\"},{"line_number":44,"context_line":"            .get_network_ip_availabilities(context, filters)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_90b3b297","line":43,"in_reply_to":"7a5de9d1_2199807c","updated":"2016-02-03 03:41:29.000000000","message":"Done","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"fd5cfaa0a2ce464bfebd66014d5ffe7134685bf6","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: id}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"},{"line_number":50,"context_line":"        if result and len(result) \u003e\u003d 1:"},{"line_number":51,"context_line":"            return result[0]"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            raise exceptions.NetworkNotFound(net_id\u003did)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_a192504a","line":50,"updated":"2016-02-01 08:12:21.000000000","message":"\"if result:\" should be sufficient here.  an empty list will evaluate to false.","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: id}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"},{"line_number":50,"context_line":"        if result and len(result) \u003e\u003d 1:"},{"line_number":51,"context_line":"            return result[0]"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            raise exceptions.NetworkNotFound(net_id\u003did)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a5de9d1_50a9ba22","line":50,"in_reply_to":"7a5de9d1_a192504a","updated":"2016-02-03 03:41:29.000000000","message":"Done","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"e8570b919e64acc0bb115df43b4be588184cf100","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        return cls._instance"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def get_plugin_description(self):"},{"line_number":35,"context_line":"        return \"Provides IP availability data for each network and subnet.\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_plugin_type(self):"},{"line_number":38,"context_line":"        return \"network-ip-availability\""}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_0fec248e","line":35,"updated":"2016-02-04 07:12:33.000000000","message":"\"Provides network(s) ip usage.\"","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"791ead6345b1aff127863128efe0f416be62d25d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        return cls._instance"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def get_plugin_description(self):"},{"line_number":35,"context_line":"        return \"Provides IP availability data for each network and subnet.\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_plugin_type(self):"},{"line_number":38,"context_line":"        return \"network-ip-availability\""}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_7506981e","line":35,"in_reply_to":"5a5ae5dd_0fec248e","updated":"2016-02-05 01:51:18.000000000","message":"The original spec/impl was named \"network-ip-usage\". After a long and drawn out process during spec review (and collisions with others using the term: \"usage\"), the word \"availability\" became the most palatable. How about this:\n\n\"Provides IP availability stats for network(s) and their nested subnet(s).\"\n\nOr... leave it as is.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"},{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: id}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"},{"line_number":50,"context_line":"        if result:"},{"line_number":51,"context_line":"            return result[0]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_28b9fce9","line":48,"updated":"2016-02-10 12:16:04.000000000","message":"Perhaps doing filters \u003d {\u0027network_id\u0027: [id]} could make your life easier? (I\u0027m talking about parsing filters in the db mixin)","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"},{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: id}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"},{"line_number":50,"context_line":"        if result:"},{"line_number":51,"context_line":"            return result[0]"}],"source_content_type":"text/x-python","patch_set":19,"id":"bae84128_03d8b352","line":48,"in_reply_to":"3a57f1b5_28b9fce9","updated":"2016-02-22 21:13:35.000000000","message":"I see where you\u0027re going with this. This is good. Will be in next patch.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"e8570b919e64acc0bb115df43b4be588184cf100","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if result:"},{"line_number":51,"context_line":"            return result[0]"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            raise exceptions.NetworkNotFound(net_id\u003did)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_ef0c2896","line":53,"updated":"2016-02-04 07:12:33.000000000","message":"why exception? can\u0027t we just return an error? after-all it\u0027s just a query.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"791ead6345b1aff127863128efe0f416be62d25d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if result:"},{"line_number":51,"context_line":"            return result[0]"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            raise exceptions.NetworkNotFound(net_id\u003did)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_3547c078","line":53,"in_reply_to":"5a5ae5dd_64737681","updated":"2016-02-05 01:51:18.000000000","message":"This singular form (line 46):\n\n/v2.0/network-ip-availability/​{network_id}\n\nis consistent in behavior as the singular for networks:\n\n/v2.0/networks/​{network_id}\n\nRef: https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_common.py#L184-L189 (via nested call starting at neutron.plugins.ml2.plugin.Ml2Plugin#get_network)\n\nI believe this should be consistent with /network singular form.\n\nOn the other hand, vikram, the plural \"query\" form (line 40) does behave as you imply by returning an empty list when no networks match network_id and also it won\u0027t raise an exception. Ex: GET /v2.0/network-ip-availabilities/​?network_id\u003dnon-matching-id-here​","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"15bdaa8c54443af2072d754829152c644b33a1b2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if result:"},{"line_number":51,"context_line":"            return result[0]"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            raise exceptions.NetworkNotFound(net_id\u003did)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a5ae5dd_64737681","line":53,"in_reply_to":"5a5ae5dd_ef0c2896","updated":"2016-02-04 09:43:10.000000000","message":"an exception has to be thrown for the neutron wsgi layer to know an error happened so that it can properly format an error message and return it and the status code to the user.  I could be misunderstanding you though.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import neutron.db.network_ip_availability_db as ip_availability_db"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class NetworkIPAvailabilityPlugin(ip_availability_db.IpAvailabilityMixin,"},{"line_number":22,"context_line":"                                  db_base_plugin_v2.NeutronDbPluginV2):"},{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_6ad9cff2","line":21,"updated":"2016-02-24 11:44:41.000000000","message":"Disclaimer: I did not have time to actually test this, but I think there is a chance that it might return unsightly 500 errors if someone tries to do a POST or a PUT on network_ip_availabilities.\n\nIf that\u0027s the case we should consider a 405 method not allowed error, and see how we can make that happen in the wsgi framework.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import neutron.db.network_ip_availability_db as ip_availability_db"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class NetworkIPAvailabilityPlugin(ip_availability_db.IpAvailabilityMixin,"},{"line_number":22,"context_line":"                                  db_base_plugin_v2.NeutronDbPluginV2):"},{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_e7f1626c","line":21,"in_reply_to":"bae84128_6ad9cff2","updated":"2016-02-25 01:16:01.000000000","message":"Will have to check this out. Crossing my fingers it returns 405 for PUT/POST. Stay tuned.\n\nIf not, I may hit you and/or others up on neutron channel (from wwriverrat) on how to we might make it \"happen in the wsgi framework\".","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f5b5dfacb910a5eded019364f06a7e6178ad3d4","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return super(NetworkIPAvailabilityPlugin,"},{"line_number":44,"context_line":"                     self).get_network_ip_availabilities(context, filters)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"},{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: [id]}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_ade1312c","line":46,"updated":"2016-02-24 11:44:41.000000000","message":"Are you sure that it does not make any sense to implement the fields selector? I agree that its usefulness is probably minimal, but it might be nice to ensure API behaviour is consistent.","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"d57b2fc4ac94b46b887106a7f22545e1bc729ef4","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return super(NetworkIPAvailabilityPlugin,"},{"line_number":44,"context_line":"                     self).get_network_ip_availabilities(context, filters)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_network_ip_availability(self, context, id\u003dNone, fields\u003dNone):"},{"line_number":47,"context_line":"        \"\"\"Return ip availability data for a specific network id.\"\"\""},{"line_number":48,"context_line":"        filters \u003d {\u0027network_id\u0027: [id]}"},{"line_number":49,"context_line":"        result \u003d self.get_network_ip_availabilities(context, filters)"}],"source_content_type":"text/x-python","patch_set":20,"id":"bae84128_40daceea","line":46,"in_reply_to":"bae84128_ade1312c","updated":"2016-02-25 01:16:01.000000000","message":"Actually, I\u0027d like to see fields supported. Time is not favorable for m3 to get fields in.\n\nOnce implemented, I would personally use the fields to minimize the response to only network information (especially when there are lots of networks and subnets).\n\nAfter merged, we might consider adding a enhancement bug to add support for it?","commit_id":"68e23dd8603374f3d5b709ac049745eb302e7da9"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"7d87f7aa7aa6fa2c9da41c3d9848106b4333ade1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    supported_extension_aliases \u003d [\"network-ip-availability\"]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @classmethod"},{"line_number":29,"context_line":"    def get_instance(cls):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_712160b4","line":26,"updated":"2016-02-26 16:04:46.000000000","message":"Suggest to add devstack changes (https://github.com/openstack/neutron/blob/master/devstack/plugin.sh)","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"635e079e6cff935b3476e3d378997b7873f3edab","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    supported_extension_aliases \u003d [\"network-ip-availability\"]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @classmethod"},{"line_number":29,"context_line":"    def get_instance(cls):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_2ae9bee6","line":26,"in_reply_to":"9aed3d3a_5b3996a3","updated":"2016-02-29 17:12:04.000000000","message":"I think it being a separate review makes sense too.  I\u0027d be fine with it being in this patch too, but since this feature freeze day, I\u0027d rather it be done in a follow-up review.","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"9289124831838abf3c9a612d1cb8ae3c40783bb6","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    supported_extension_aliases \u003d [\"network-ip-availability\"]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @classmethod"},{"line_number":29,"context_line":"    def get_instance(cls):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_791ca213","line":26,"in_reply_to":"9aed3d3a_712160b4","updated":"2016-02-26 17:44:15.000000000","message":"vikram, I\u0027m thinking this comment might be better suited for the API test review that is tied to this project?  https://review.openstack.org/#/c/283357","commit_id":"a43126bdf010bf13966f922615da218f70203079"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"797d2df033591830438df286ce94bb9e64417551","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"This plugin exposes IP availability data for networks and subnets.\"\"\""},{"line_number":24,"context_line":"    _instance \u003d None"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    supported_extension_aliases \u003d [\"network-ip-availability\"]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    @classmethod"},{"line_number":29,"context_line":"    def get_instance(cls):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aed3d3a_5b3996a3","line":26,"in_reply_to":"9aed3d3a_791ca213","updated":"2016-02-29 07:53:27.000000000","message":"IMO, it would be better to do devstack changes alongwith this PS as new plugin change will be introduced as part of this effort. Anyways, no hard rules, unless we take care of this.","commit_id":"a43126bdf010bf13966f922615da218f70203079"}],"neutron/services/network_ip_usage/README.md":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"04a65342eacbb539f1b628282792a12bbd28d54b","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"The following article documents the API for the ELS OpenStack Extension: Ip Usage"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"This extension is an information-only api that allows a user or process to determine the amount of ips that are consumed across networks and their subnets\u0027 allocation pools."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"# Table of Contents #"},{"line_number":8,"context_line":"[API Specification](#api-specification)"}],"source_content_type":"text/x-gfm","patch_set":6,"id":"ba15a1d1_faf17396","line":5,"updated":"2015-09-21 16:27:44.000000000","message":"nit: line length","commit_id":"2eec3d420bc4ae891887dbffc18383bc60358704"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"04ea215c30ef559a3bec0563b559024538b3ea9c","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"The following article documents the API for the ELS OpenStack Extension: Ip Usage"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"This extension is an information-only api that allows a user or process to determine the amount of ips that are consumed across networks and their subnets\u0027 allocation pools."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"# Table of Contents #"},{"line_number":8,"context_line":"[API Specification](#api-specification)"}],"source_content_type":"text/x-gfm","patch_set":6,"id":"ba15a1d1_f0c6f29a","line":5,"in_reply_to":"ba15a1d1_faf17396","updated":"2015-09-24 02:48:58.000000000","message":"Done","commit_id":"2eec3d420bc4ae891887dbffc18383bc60358704"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"b57763bc8ebe0a37765a2a171630760e1acc7713","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1a26ad4f_d98e3327","updated":"2015-10-27 08:16:23.000000000","message":"This whole page needs reviewed/updated. Should it be kept?","commit_id":"82488157ddbb40ef7627d8b2f533af14a1f77660"},{"author":{"_account_id":8515,"name":"Shraddha Pandhe","email":"shraddha.pandhe@yahoo.com","username":"spandhe"},"change_message_id":"c940deccad2a1c0f3cbc8fe6d7ebee9b9cc5a32c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"[API Specification](#api-specification)"},{"line_number":10,"context_line":"- [End Points](#end-points)"},{"line_number":11,"context_line":"- [Get usage for all networks](#get-usage-for-all-networks)"},{"line_number":12,"context_line":"- [Get usage by network uuid](#get-usage-by-network-id)"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"## API Specification ###"}],"source_content_type":"text/x-gfm","patch_set":14,"id":"fa69d971_f7cae36d","line":12,"updated":"2016-01-08 01:56:41.000000000","message":"Can we also support \"Get usage by list of network uuids\" ? It would be useful in scenarios where there are 10,000s of networks and only a few hundreds/thousands of them make sense.","commit_id":"40f1d9b704b758f38dee6d30129fd0abaf2f12d5"},{"author":{"_account_id":8515,"name":"Shraddha Pandhe","email":"shraddha.pandhe@yahoo.com","username":"spandhe"},"change_message_id":"96e70334659debabe6f48a6339a5281a1a30dda3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            \"name\": \"net2\","},{"line_number":73,"context_line":"            \"subnet_ip_allocations\": [],"},{"line_number":74,"context_line":"            \"total_ips\": 0,"},{"line_number":75,"context_line":"            \"used_ips\": 0"},{"line_number":76,"context_line":"        }"},{"line_number":77,"context_line":"    ]"},{"line_number":78,"context_line":"}"}],"source_content_type":"text/x-gfm","patch_set":14,"id":"fa69d971_19d405bb","line":75,"range":{"start_line":75,"start_character":13,"end_line":75,"end_character":21},"updated":"2016-01-05 23:05:09.000000000","message":"If there are no subnets in the network, returning 0 for used_ips is a bit misleading. Whoever is requesting this data now needs to look at used_ips and total_ips/subnet_ip_allocations to figure out that there are actually no subnets in this. Should it be set to something like -1 instead?","commit_id":"40f1d9b704b758f38dee6d30129fd0abaf2f12d5"}],"neutron/services/network_ip_usage/plugin.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"df70e866535ba2bbdbb94b9d6e99dc4bbb8907ca","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.db.ip_usage_db import IpUsageMixin"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class IpUsagePlugin(db_base_plugin_v2.NeutronDbPluginV2, IpUsageMixin):"},{"line_number":22,"context_line":"    \"\"\"This plugin exposes IP usage data for networks and subnets.\"\"\""},{"line_number":23,"context_line":"    _instance \u003d None"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_ea4bf3ae","line":21,"updated":"2015-08-18 00:23:34.000000000","message":"normally mixins come first in class list","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":9060,"name":"Mike Dorman","email":"dorm@dorm.org","username":"gd-mdorman"},"change_message_id":"bbb4caaac144e8655bac0f06f1b5f4fd269c6af8","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.db.ip_usage_db import IpUsageMixin"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class IpUsagePlugin(db_base_plugin_v2.NeutronDbPluginV2, IpUsageMixin):"},{"line_number":22,"context_line":"    \"\"\"This plugin exposes IP usage data for networks and subnets.\"\"\""},{"line_number":23,"context_line":"    _instance \u003d None"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_f6d487ec","line":21,"in_reply_to":"fa1b9901_ea4bf3ae","updated":"2015-08-21 04:25:12.000000000","message":"Done","commit_id":"a0763b2ef5f57ad2ce00e2c53dab860bd9f3abac"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        return cls._instance"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def get_plugin_description(self):"},{"line_number":34,"context_line":"        return \"Provides IP usage data for each network and subnet.\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_plugin_type(self):"},{"line_number":37,"context_line":"        return \"network-ip-usage\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_7d899425","line":34,"updated":"2015-10-30 15:53:02.000000000","message":"What about translations?","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        return cls._instance"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def get_plugin_description(self):"},{"line_number":34,"context_line":"        return \"Provides IP usage data for each network and subnet.\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_plugin_type(self):"},{"line_number":37,"context_line":"        return \"network-ip-usage\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_7706881e","line":34,"in_reply_to":"1a26ad4f_7d899425","updated":"2015-10-31 07:17:20.000000000","message":"I looked through several of the other plugins implemented and see that none of them do I18n translations here. While it may be correct to do the translations, I\u0027m not quite sure of its effect if I \"buck the convention\".  Therefore, I\u0027m going to leave this as is.\n\nSome existing examples in liberty (that are NOT I18n compliant):\n\nhttps://github.com/openstack/neutron/blob/stable/liberty/neutron/extensions/dvr.py#L59\nhttps://github.com/openstack/neutron/blob/stable/liberty/neutron/extensions/allowedaddresspairs.py#L123\nhttps://github.com/openstack/neutron/blob/stable/liberty/neutron/extensions/dns.py#L167\nhttps://github.com/openstack/neutron/blob/stable/liberty/neutron/extensions/flavors.py#L109","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_522d9afc","line":2,"updated":"2015-10-31 08:42:58.000000000","message":"itto","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#  Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_f8dcc574","line":2,"in_reply_to":"1a26ad4f_522d9afc","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#  limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":18,"context_line":"from neutron.db.ip_usage_db import IpUsageMixin"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class IpUsagePlugin(IpUsageMixin, db_base_plugin_v2.NeutronDbPluginV2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_72321661","line":18,"updated":"2015-10-31 08:42:58.000000000","message":"Import modules","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#  limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":18,"context_line":"from neutron.db.ip_usage_db import IpUsageMixin"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class IpUsagePlugin(IpUsageMixin, db_base_plugin_v2.NeutronDbPluginV2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_d8df8967","line":18,"in_reply_to":"1a26ad4f_72321661","updated":"2015-10-31 22:59:13.000000000","message":"Done","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"}],"neutron/tests/unit/extensions/test_network_ip_availability.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"c2a45f0832a50e1c764602f09e68da516bee1be4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 GoDaddy."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#  you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_fbe85712","line":1,"updated":"2016-01-20 06:38:43.000000000","message":"2016 ;)","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"56fcd11b167d364b5023af9f0626e3ecd6388ad3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        for ip_availability in availabilities:"},{"line_number":64,"context_line":"            if net_id \u003d\u003d ip_availability[\u0027id\u0027]:"},{"line_number":65,"context_line":"                return ip_availability"},{"line_number":66,"context_line":"        return None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_basic(self):"},{"line_number":69,"context_line":"        with self.network() as net:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_d6c71396","line":66,"updated":"2016-01-14 18:42:15.000000000","message":"by default a method returns None. You do not need to specifically do this","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"2ace15193cdbce956b0bd220146a1a8b778e0b6a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        for ip_availability in availabilities:"},{"line_number":64,"context_line":"            if net_id \u003d\u003d ip_availability[\u0027id\u0027]:"},{"line_number":65,"context_line":"                return ip_availability"},{"line_number":66,"context_line":"        return None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_basic(self):"},{"line_number":69,"context_line":"        with self.network() as net:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_26ecaf8e","line":66,"in_reply_to":"da6ed579_d6c71396","updated":"2016-01-19 22:05:01.000000000","message":"Done","commit_id":"e497ef05889d604bad855eb9bbc5c67545a308c7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"8749af8bd5635958e636cfdcf8d1de52ae40eab5","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestNetworkIPAvailabilityAPI("},{"line_number":32,"context_line":"        test_db_base_plugin_v2.NeutronDbPluginV2TestCase):"},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        svc_plugins \u003d {\u0027plugin_name\u0027: PLUGIN_NAME}"},{"line_number":35,"context_line":"        super(TestNetworkIPAvailabilityAPI, self).setUp("}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_68bb74c5","line":32,"updated":"2016-02-10 12:16:04.000000000","message":"These are good, but this feature also needs API tests. Do you have them in another patch?","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"320eadf4adba634f319ed1ae96531a2411c73c58","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestNetworkIPAvailabilityAPI("},{"line_number":32,"context_line":"        test_db_base_plugin_v2.NeutronDbPluginV2TestCase):"},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        svc_plugins \u003d {\u0027plugin_name\u0027: PLUGIN_NAME}"},{"line_number":35,"context_line":"        super(TestNetworkIPAvailabilityAPI, self).setUp("}],"source_content_type":"text/x-python","patch_set":19,"id":"3a57f1b5_b53c5194","line":32,"in_reply_to":"3a57f1b5_68bb74c5","updated":"2016-02-22 21:13:35.000000000","message":"Working on that now. There are a couple of people in the ##osic-neutron channel helping out with this. We\u0027re all wrapping our heads around ensuring the plugin is enabled (disabled by default), installing it properly in devstack and ensuring the tests get run.","commit_id":"444c5f73465ea668f5b32ca048594d7db772cda9"}],"neutron/tests/unit/extensions/test_network_ip_usage.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                request \u003d self.new_list_request(API_RESOURCE)"},{"line_number":64,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":65,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":66,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":67,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":68,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":69,"context_line":"                self._validate_usage(network, usage, 0)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_dda9c87c","line":66,"updated":"2015-10-30 15:53:02.000000000","message":"assrtIn","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                request \u003d self.new_list_request(API_RESOURCE)"},{"line_number":64,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":65,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":66,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":67,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":68,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":69,"context_line":"                self._validate_usage(network, usage, 0)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_17107458","line":66,"in_reply_to":"1a26ad4f_dda9c87c","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    response \u003d self.deserialize("},{"line_number":96,"context_line":"                        self.fmt, request.get_response(self.ext_api))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"                    self.assertTrue(USAGES_KEY in response)"},{"line_number":99,"context_line":"                    self.assertEqual(3, len(response[USAGES_KEY]))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"                    data \u003d response[USAGES_KEY]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_5d5e1877","line":98,"updated":"2015-10-30 15:53:02.000000000","message":"assertIn","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    response \u003d self.deserialize("},{"line_number":96,"context_line":"                        self.fmt, request.get_response(self.ext_api))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"                    self.assertTrue(USAGES_KEY in response)"},{"line_number":99,"context_line":"                    self.assertEqual(3, len(response[USAGES_KEY]))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"                    data \u003d response[USAGES_KEY]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_37157048","line":98,"in_reply_to":"1a26ad4f_5d5e1877","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                    response \u003d self.deserialize("},{"line_number":136,"context_line":"                        self.fmt, request.get_response(self.ext_api))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"                    self.assertTrue(USAGES_KEY in response)"},{"line_number":139,"context_line":"                    self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"                    data \u003d response[USAGES_KEY]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_7dc8b422","line":138,"updated":"2015-10-30 15:53:02.000000000","message":"assertIn","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                    response \u003d self.deserialize("},{"line_number":136,"context_line":"                        self.fmt, request.get_response(self.ext_api))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"                    self.assertTrue(USAGES_KEY in response)"},{"line_number":139,"context_line":"                    self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"                    data \u003d response[USAGES_KEY]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_d70e7c3a","line":138,"in_reply_to":"1a26ad4f_7dc8b422","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                request \u003d self.new_list_request(API_RESOURCE, params\u003dparams)"},{"line_number":178,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":179,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":180,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":181,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":182,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":183,"context_line":"                self._validate_usage(network, usage, 0)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_7def5487","line":180,"updated":"2015-10-30 15:53:02.000000000","message":"assertIn","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                request \u003d self.new_list_request(API_RESOURCE, params\u003dparams)"},{"line_number":178,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":179,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":180,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":181,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":182,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":183,"context_line":"                self._validate_usage(network, usage, 0)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_f70b7828","line":180,"in_reply_to":"1a26ad4f_7def5487","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"001de88f16d799220839e66137d9a032cb8bd9c7","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                request \u003d self.new_list_request(API_RESOURCE, params\u003dparams)"},{"line_number":270,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":271,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":272,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":273,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":274,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":275,"context_line":"                self.assertEqual(test_name, usage[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_bd940ce2","line":272,"updated":"2015-10-30 15:53:02.000000000","message":"assertIn","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"f8e702c7f82910ce33a4026c5df6d23e77d69bd1","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                request \u003d self.new_list_request(API_RESOURCE, params\u003dparams)"},{"line_number":270,"context_line":"                response \u003d self.deserialize(self.fmt,"},{"line_number":271,"context_line":"                                            request.get_response(self.ext_api))"},{"line_number":272,"context_line":"                self.assertTrue(USAGES_KEY in response)"},{"line_number":273,"context_line":"                self.assertEqual(1, len(response[USAGES_KEY]))"},{"line_number":274,"context_line":"                usage \u003d response[USAGES_KEY][0]"},{"line_number":275,"context_line":"                self.assertEqual(test_name, usage[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a26ad4f_b7018008","line":272,"in_reply_to":"1a26ad4f_bd940ce2","updated":"2015-10-31 07:17:20.000000000","message":"Done","commit_id":"40e067c31f96eddbf82aa9ef6b2c9b04192fa080"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4f1a9e3510e607207035d88b930bc82ee824571f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_d228cae4","line":1,"updated":"2015-10-31 08:42:58.000000000","message":"It doesn\u0027t look like unittests as it tests the extension and the db module","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"3ed8c7c8ada6bcbd91a7dcdc35f62baba31ef01c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Go Daddy."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a26ad4f_cca82e7a","line":1,"in_reply_to":"1a26ad4f_d228cae4","updated":"2015-10-31 22:59:13.000000000","message":"I guess the core of this plugin is the query and what it does. I\u0027ll look to unit test some of the helper methods in a future commit.","commit_id":"9f920533b51a71e3d530659cb354416a980014aa"},{"author":{"_account_id":8515,"name":"Shraddha Pandhe","email":"shraddha.pandhe@yahoo.com","username":"spandhe"},"change_message_id":"84f71b9d97699b4174fc8508c247f285a1a799f8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                         plugin.IpUsagePlugin.__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestNetworkIPUsageAPI(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        svc_plugins \u003d {\u0027plugin_name\u0027: PLUGIN_NAME}"},{"line_number":34,"context_line":"        super(TestNetworkIPUsageAPI, self).setUp(service_plugins\u003dsvc_plugins)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_79042117","line":31,"range":{"start_line":31,"start_character":6,"end_line":31,"end_character":27},"updated":"2016-01-05 23:14:04.000000000","message":"I would suggest adding more test scenarios where allocation pool is specified for the subnet.","commit_id":"40f1d9b704b758f38dee6d30129fd0abaf2f12d5"},{"author":{"_account_id":8515,"name":"Shraddha Pandhe","email":"shraddha.pandhe@yahoo.com","username":"spandhe"},"change_message_id":"84f71b9d97699b4174fc8508c247f285a1a799f8","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    self.assertIn(USAGE_KEY, response)"},{"line_number":148,"context_line":"                    self._validate_usage(network, response[USAGE_KEY], 3, 506)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def test_usages_port_consumed_v4(self):"},{"line_number":151,"context_line":"        with self.network() as net:"},{"line_number":152,"context_line":"            with self.subnet(network\u003dnet) as subnet:"},{"line_number":153,"context_line":"                request \u003d self.new_list_request(API_RESOURCE)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_6b49a45f","line":150,"range":{"start_line":150,"start_character":7,"end_line":150,"end_character":8},"updated":"2016-01-05 23:14:04.000000000","message":"can you add a test case for multi net, multi subnet with both v4 and v6 subnets, without requesting specific ip version in the request? Then validate both v4 and v6 subnet ip counts and ip version values.","commit_id":"40f1d9b704b758f38dee6d30129fd0abaf2f12d5"}],"releasenotes/notes/network_ip_availability-d64bd7032b3c15ee.yaml":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"26c5fee9920a931b624eae17039b602a2934ce14","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  Neutron now provides network IP availability information."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - A new API endpoint /v2.0/network-ip-availabilities that allows an admin"},{"line_number":6,"context_line":"    to quickly get counts of used_ips and total_ips for networks. New endpoint"},{"line_number":7,"context_line":"    allows filtering by any of the following - network_id, network_name,"},{"line_number":8,"context_line":"    tenant_id, and ip_version. Response returns network and nested subnet data"},{"line_number":9,"context_line":"    that includes used and total IPs."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"9a68dd71_7fdacee9","line":6,"updated":"2016-01-23 04:46:32.000000000","message":"network/s","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  Neutron now provides network IP availability information."},{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - A new API endpoint /v2.0/network-ip-availabilities that allows an admin"},{"line_number":6,"context_line":"    to quickly get counts of used_ips and total_ips for networks. New endpoint"},{"line_number":7,"context_line":"    allows filtering by any of the following - network_id, network_name,"},{"line_number":8,"context_line":"    tenant_id, and ip_version. Response returns network and nested subnet data"},{"line_number":9,"context_line":"    that includes used and total IPs."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a5de9d1_337a0889","line":6,"in_reply_to":"9a68dd71_7fdacee9","updated":"2016-02-03 03:41:29.000000000","message":"Done\n\nBut changed to network(s)","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"26c5fee9920a931b624eae17039b602a2934ce14","unresolved":false,"context_lines":[{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - A new API endpoint /v2.0/network-ip-availabilities that allows an admin"},{"line_number":6,"context_line":"    to quickly get counts of used_ips and total_ips for networks. New endpoint"},{"line_number":7,"context_line":"    allows filtering by any of the following - network_id, network_name,"},{"line_number":8,"context_line":"    tenant_id, and ip_version. Response returns network and nested subnet data"},{"line_number":9,"context_line":"    that includes used and total IPs."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"9a68dd71_dfef3a85","line":7,"updated":"2016-01-23 04:46:32.000000000","message":"remove \"any of the following - \"","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"},{"author":{"_account_id":10962,"name":"David Bingham","email":"dbingham@godaddy.com","username":"wwriverrat"},"change_message_id":"0bc2aef69763c7f43b3364ae5717c8842a1377ca","unresolved":false,"context_lines":[{"line_number":4,"context_line":"features:"},{"line_number":5,"context_line":"  - A new API endpoint /v2.0/network-ip-availabilities that allows an admin"},{"line_number":6,"context_line":"    to quickly get counts of used_ips and total_ips for networks. New endpoint"},{"line_number":7,"context_line":"    allows filtering by any of the following - network_id, network_name,"},{"line_number":8,"context_line":"    tenant_id, and ip_version. Response returns network and nested subnet data"},{"line_number":9,"context_line":"    that includes used and total IPs."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a5de9d1_d3a374fe","line":7,"in_reply_to":"9a68dd71_dfef3a85","updated":"2016-02-03 03:41:29.000000000","message":"Done","commit_id":"a29be55f1690c47312ae9c4eb07fc9c2dfff0eff"}]}
