)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"f803a6e3d5ad451fcaaa6ca09ec1d3beae4351e7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"interface of the private network which has the same ip cidr with"},{"line_number":12,"context_line":"public network."},{"line_number":13,"context_line":"Or the router already has the private network interface it will be"},{"line_number":14,"context_line":"unable to set gateway."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch add setting \u0027ALLOWED_PRIVATE_SUBNET_CIDR\u0027 to decide"},{"line_number":17,"context_line":"whether to restrict user private network cidr input. And admin"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_c5d48048","line":14,"updated":"2016-06-17 20:22:01.000000000","message":"If I understand this properly, I would rephrase it as:\n\nIf the user\u0027s private network has the same CIDR as the public network, there will be an error.  The router is unable to set the gateway properly when the private and public CIDR overlap.","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"43e50d22537a75f3d336cd590828164c373dc3e7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"interface of the private network which has the same ip cidr with"},{"line_number":12,"context_line":"public network."},{"line_number":13,"context_line":"Or the router already has the private network interface it will be"},{"line_number":14,"context_line":"unable to set gateway."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch add setting \u0027ALLOWED_PRIVATE_SUBNET_CIDR\u0027 to decide"},{"line_number":17,"context_line":"whether to restrict user private network cidr input. And admin"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_5fb2184a","line":14,"in_reply_to":"7aa08908_c5d48048","updated":"2016-06-18 02:43:00.000000000","message":"Done","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"f803a6e3d5ad451fcaaa6ca09ec1d3beae4351e7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"whether to restrict user private network cidr input. And admin"},{"line_number":18,"context_line":"dashboard network was not restricted."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Exemple:"},{"line_number":21,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027],"},{"line_number":22,"context_line":"                               \u0027v6\u0027: [\u0027fc00::/7\u0027,]}"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_02131e66","line":20,"updated":"2016-06-17 20:22:01.000000000","message":"Exemple: -\u003e Example:","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"43e50d22537a75f3d336cd590828164c373dc3e7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"whether to restrict user private network cidr input. And admin"},{"line_number":18,"context_line":"dashboard network was not restricted."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Exemple:"},{"line_number":21,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027],"},{"line_number":22,"context_line":"                               \u0027v6\u0027: [\u0027fc00::/7\u0027,]}"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_bf817c4f","line":20,"in_reply_to":"7aa08908_02131e66","updated":"2016-06-18 02:43:00.000000000","message":"Done","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"f803a6e3d5ad451fcaaa6ca09ec1d3beae4351e7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027],"},{"line_number":22,"context_line":"                               \u0027v6\u0027: [\u0027fc00::/7\u0027,]}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"By default, leave the \u0027v4\u0027 and \u0027v6\u0027 with empty list,"},{"line_number":25,"context_line":"then user subnet cidr input will not be restricted."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_0245de6d","line":24,"updated":"2016-06-17 20:22:01.000000000","message":"list -\u003e lists","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"43e50d22537a75f3d336cd590828164c373dc3e7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027],"},{"line_number":22,"context_line":"                               \u0027v6\u0027: [\u0027fc00::/7\u0027,]}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"By default, leave the \u0027v4\u0027 and \u0027v6\u0027 with empty list,"},{"line_number":25,"context_line":"then user subnet cidr input will not be restricted."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7aa08908_9f864063","line":24,"in_reply_to":"7aa08908_0245de6d","updated":"2016-06-18 02:43:00.000000000","message":"Done","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"}],"doc/source/topics/settings.rst":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":1671,"context_line":"    PANEL_GROUP_DASHBOARD \u003d \u0027admin\u0027"},{"line_number":1672,"context_line":""},{"line_number":1673,"context_line":"``ALLOWED_PRIVATE_NET_CIDR``"},{"line_number":1674,"context_line":"----------------------"},{"line_number":1675,"context_line":""},{"line_number":1676,"context_line":".. versionadded:: 2016.1(Mitaka)"},{"line_number":1677,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_9f199924","line":1674,"updated":"2016-01-06 16:25:11.000000000","message":"This is the wrong section. You need to add a new option to OpenStack Dashboard section.","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":1671,"context_line":"    PANEL_GROUP_DASHBOARD \u003d \u0027admin\u0027"},{"line_number":1672,"context_line":""},{"line_number":1673,"context_line":"``ALLOWED_PRIVATE_NET_CIDR``"},{"line_number":1674,"context_line":"----------------------"},{"line_number":1675,"context_line":""},{"line_number":1676,"context_line":".. versionadded:: 2016.1(Mitaka)"},{"line_number":1677,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_6a572826","line":1674,"in_reply_to":"fa69d971_9f199924","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":1673,"context_line":"``ALLOWED_PRIVATE_NET_CIDR``"},{"line_number":1674,"context_line":"----------------------"},{"line_number":1675,"context_line":""},{"line_number":1676,"context_line":".. versionadded:: 2016.1(Mitaka)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"Default: ``{\u0027v4\u0027: [], \u0027v6\u0027: []}``"},{"line_number":1679,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_3fdf4d3b","line":1676,"range":{"start_line":1676,"start_character":18,"end_line":1676,"end_character":24},"updated":"2016-01-06 16:25:11.000000000","message":"The version corresponding to Mitaka is 9.0.0.","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":1673,"context_line":"``ALLOWED_PRIVATE_NET_CIDR``"},{"line_number":1674,"context_line":"----------------------"},{"line_number":1675,"context_line":""},{"line_number":1676,"context_line":".. versionadded:: 2016.1(Mitaka)"},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"Default: ``{\u0027v4\u0027: [], \u0027v6\u0027: []}``"},{"line_number":1679,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_8a529c33","line":1676,"range":{"start_line":1676,"start_character":18,"end_line":1676,"end_character":24},"in_reply_to":"fa69d971_3fdf4d3b","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":1679,"context_line":""},{"line_number":1680,"context_line":"Dict used to restrict user private network range."},{"line_number":1681,"context_line":"By default, leave the \u0027v4\u0027 and \u0027v6\u0027 with empty list"},{"line_number":1682,"context_line":"then user input will not be restricted."},{"line_number":1683,"context_line":""},{"line_number":1684,"context_line":"Example: ``{\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027], \u0027v6\u0027: [\u0027fc00::/7\u0027,]}``"}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_ed7b48bc","line":1682,"updated":"2016-01-06 16:25:11.000000000","message":"Consider rewording:\n\nAn empty list means that user input will not be restricted for a corresponding IP version. By default, there is no restriction for both IPv4 and IPv6.","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":1679,"context_line":""},{"line_number":1680,"context_line":"Dict used to restrict user private network range."},{"line_number":1681,"context_line":"By default, leave the \u0027v4\u0027 and \u0027v6\u0027 with empty list"},{"line_number":1682,"context_line":"then user input will not be restricted."},{"line_number":1683,"context_line":""},{"line_number":1684,"context_line":"Example: ``{\u0027v4\u0027: [\u0027192.168.0.0/16\u0027, \u002710.0.0.0/8\u0027], \u0027v6\u0027: [\u0027fc00::/7\u0027,]}``"}],"source_content_type":"text/x-rst","patch_set":7,"id":"fa69d971_2a34d0f9","line":1682,"in_reply_to":"fa69d971_ed7b48bc","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"00f35f9e20989beffb7f93215d391fad869e484e","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"reasons."},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"``ALLOWED_PRIVATE_SUBNET_CIDR``"},{"line_number":1555,"context_line":"----------------------"},{"line_number":1556,"context_line":""},{"line_number":1557,"context_line":".. versionadded:: 10.0.0(Newton)"},{"line_number":1558,"context_line":""}],"source_content_type":"text/x-rst","patch_set":22,"id":"dada55a8_8097f146","line":1555,"range":{"start_line":1555,"start_character":0,"end_line":1555,"end_character":22},"updated":"2016-07-21 03:38:51.000000000","message":"The length should match the length of the previous line.","commit_id":"f4f17dbbe27bd64c81d951f86e7ff389dfb43732"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ed42fd20915cf2e431226b0e84deb84f8b56a60b","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"reasons."},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":"``ALLOWED_PRIVATE_SUBNET_CIDR``"},{"line_number":1555,"context_line":"----------------------"},{"line_number":1556,"context_line":""},{"line_number":1557,"context_line":".. versionadded:: 10.0.0(Newton)"},{"line_number":1558,"context_line":""}],"source_content_type":"text/x-rst","patch_set":22,"id":"dada55a8_7660c701","line":1555,"range":{"start_line":1555,"start_character":0,"end_line":1555,"end_character":22},"in_reply_to":"dada55a8_8097f146","updated":"2016-07-21 05:52:21.000000000","message":"Done","commit_id":"f4f17dbbe27bd64c81d951f86e7ff389dfb43732"}],"openstack_dashboard/dashboards/admin/networks/subnets/workflows.py":[{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"18c806768175913a637af1a366eca6a0fc006dac","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":35,"context_line":"    with_subnet \u003d forms.BooleanField(initial\u003dTrue, required\u003dFalse,"},{"line_number":36,"context_line":"                                     widget\u003dforms.HiddenInput())"},{"line_number":37,"context_line":"    msg \u003d _(\u0027Specify \"Network Address\"\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue):"},{"line_number":40,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_8e23f703","line":37,"updated":"2014-12-22 17:23:42.000000000","message":"(nit) should be higher 45line","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"631de0e8474fca3f0c977da9549e5a57d2a0fdd4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":35,"context_line":"    with_subnet \u003d forms.BooleanField(initial\u003dTrue, required\u003dFalse,"},{"line_number":36,"context_line":"                                     widget\u003dforms.HiddenInput())"},{"line_number":37,"context_line":"    msg \u003d _(\u0027Specify \"Network Address\"\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue):"},{"line_number":40,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a3eb57a2","line":37,"in_reply_to":"3a961159_758cc8d7","updated":"2014-12-23 13:15:58.000000000","message":"I will remove this. It will inherit from net_workflows.CreateSubnetInfoAction.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6da58d78d90cc67b1e3b244e0d082468f28fdf73","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":35,"context_line":"    with_subnet \u003d forms.BooleanField(initial\u003dTrue, required\u003dFalse,"},{"line_number":36,"context_line":"                                     widget\u003dforms.HiddenInput())"},{"line_number":37,"context_line":"    msg \u003d _(\u0027Specify \"Network Address\"\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue):"},{"line_number":40,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e089df6f","line":37,"in_reply_to":"3a961159_8e23f703","updated":"2014-12-23 01:09:32.000000000","message":"Please origin code see here:\nhttps://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/workflows.py#L154","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"cc3aa4b96b050bae9a202bcbddc825cc818b3c44","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":35,"context_line":"    with_subnet \u003d forms.BooleanField(initial\u003dTrue, required\u003dFalse,"},{"line_number":36,"context_line":"                                     widget\u003dforms.HiddenInput())"},{"line_number":37,"context_line":"    msg \u003d _(\u0027Specify \"Network Address\"\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue):"},{"line_number":40,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_758cc8d7","line":37,"in_reply_to":"3a961159_e089df6f","updated":"2014-12-23 09:33:53.000000000","message":"I see origin code. But you can rewrite it. Please explain me: Why we do not  move this msg to 45line ? it would be like the rest of the code...","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"544f98765ffa91919822cc4569b3888274a44060","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_f7653245","line":46,"updated":"2014-12-22 15:36:05.000000000","message":"You can use \u0027else\u0027 clause here.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7bb52fe3c935d7f431befb56d21615fc0c7d7379","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b5a0f0f4","line":46,"in_reply_to":"3a961159_20ef671f","updated":"2014-12-23 09:10:43.000000000","message":"Ok, but whole _check_subnet_data looks identical to linked code, so I see no need to copy-paste it here and override definition inherited from net_workflows.CreateSubnetInfoAction.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"abdcfb86f671b5f095b9884368b9124ef5e3241a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3ef7475b","line":46,"in_reply_to":"3a961159_37fb1dc2","updated":"2014-12-26 06:55:46.000000000","message":"Your example will inherit the code\nif (check_private and not subnet.is_private() and\n                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True))...\nSo it will restrict administrator to create network.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"49824f5df2595d7d9fde4460baa4fbeb5001d584","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_adca1618","line":46,"in_reply_to":"3a961159_3ef7475b","updated":"2014-12-29 14:44:23.000000000","message":"Yes, that\u0027s the point, this code is inherited, but because check_private\u003dFalse whole condition will be false and exception won\u0027t be thrown.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eb63eb51df5add43e1a717bbbf837468e644aa49","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_70d641f3","line":46,"in_reply_to":"3a961159_adca1618","updated":"2014-12-29 15:29:47.000000000","message":"Done","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"631de0e8474fca3f0c977da9549e5a57d2a0fdd4","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e309df95","line":46,"in_reply_to":"3a961159_b5a0f0f4","updated":"2014-12-23 13:15:58.000000000","message":"Inherited every function except this, because no need to restrict administrator creating network input. See the difference between this file line 60 and this patch project/networks/workflows.py line 189.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"09e88c38f01adcd5d94fc1fb7f66c02e8e468330","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_37fb1dc2","line":46,"in_reply_to":"3a961159_e309df95","updated":"2014-12-23 16:03:18.000000000","message":"Ok missed this correlation, but still you can avoid copy-paste by adding another parameter to _check_subnet_data in project/networks/workflows.py that will allow to disable this additional check. Example:\n\n# project/networks/workflows.py\n    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,\n                           check_private\u003dTrue):\n        ...\n        if cidr:\n            ...\n            if (check_private and not subnet.is_private() and\n                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True)):\n                ...\n                \n# admin/networks/subnets/workflows.py\n    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,\n                           check_private\u003dFalse):\n        super(CreateSubnetInfoAction, self)._check_subnet_data(\n            cleaned_data, is_create, check_private\n        )","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6da58d78d90cc67b1e3b244e0d082468f28fdf73","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        no_gateway \u003d cleaned_data.get(\u0027no_gateway\u0027)"},{"line_number":44,"context_line":"        if not cidr:"},{"line_number":45,"context_line":"            raise forms.ValidationError(self.msg)"},{"line_number":46,"context_line":"        if cidr:"},{"line_number":47,"context_line":"            subnet \u003d netaddr.IPNetwork(cidr)"},{"line_number":48,"context_line":"            if subnet.version !\u003d ip_version:"},{"line_number":49,"context_line":"                msg \u003d _(\u0027Network Address and IP version are inconsistent.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_20ef671f","line":46,"in_reply_to":"3a961159_f7653245","updated":"2014-12-23 01:09:32.000000000","message":"Please origin code see here:\nhttps://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/workflows.py#L179","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"544f98765ffa91919822cc4569b3888274a44060","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if not is_create and not no_gateway and not gateway_ip:"},{"line_number":61,"context_line":"            msg \u003d _(\u0027Specify IP address of gateway or \u0027"},{"line_number":62,"context_line":"                    \u0027check \"Disable Gateway\".\u0027)"},{"line_number":63,"context_line":"            raise forms.ValidationError(msg)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    class Meta:"},{"line_number":66,"context_line":"        name \u003d _(\"Subnet\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3a7081a3","line":63,"updated":"2014-12-22 15:36:05.000000000","message":"Previous two condition sequences can be restructured:\n\n    if not no_gateway:\n        if gateway_ip:\n            if netaddr.IPAddress(gateway_ip).version is not ip_version:\n                ...\n        else:\n            if not is_create:\n                ...","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6da58d78d90cc67b1e3b244e0d082468f28fdf73","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if not is_create and not no_gateway and not gateway_ip:"},{"line_number":61,"context_line":"            msg \u003d _(\u0027Specify IP address of gateway or \u0027"},{"line_number":62,"context_line":"                    \u0027check \"Disable Gateway\".\u0027)"},{"line_number":63,"context_line":"            raise forms.ValidationError(msg)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    class Meta:"},{"line_number":66,"context_line":"        name \u003d _(\"Subnet\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_40f2b306","line":63,"in_reply_to":"3a961159_3a7081a3","updated":"2014-12-23 01:09:32.000000000","message":"Please see origin code here:\nhttps://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/workflows.py#L193","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    def clean(self):"},{"line_number":34,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":35,"context_line":"        self._check_subnet_data(cleaned_data,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_7f1865d3","line":32,"updated":"2016-01-06 16:25:11.000000000","message":"Per my comment in project network workflow,\n\n\n   class CreateSubnetInfoAction(...):\n        check_subnet_range \u003d False","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    def clean(self):"},{"line_number":34,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":35,"context_line":"        self._check_subnet_data(cleaned_data,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_4c2e01a6","line":32,"in_reply_to":"fa69d971_7f1865d3","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"97b84397c8f53c457fb3b8dd2331e981dd168ce4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    check_subnet_range \u003d False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def clean(self):"},{"line_number":36,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":37,"context_line":"        self._check_subnet_data(cleaned_data, is_create\u003dTrue)"},{"line_number":38,"context_line":"        return cleaned_data"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_55fbe446","line":35,"updated":"2016-01-07 03:12:38.000000000","message":"Do we need to redefine this method here? It looks same as the method of the parent class.","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"75caaa52e95c0918efbe1c085d7b4e9d85f1b2a7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    check_subnet_range \u003d False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def clean(self):"},{"line_number":36,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":37,"context_line":"        self._check_subnet_data(cleaned_data, is_create\u003dTrue)"},{"line_number":38,"context_line":"        return cleaned_data"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_a0ae9c2b","line":35,"in_reply_to":"fa69d971_55fbe446","updated":"2016-01-07 03:55:37.000000000","message":"This is needed, some thing similar to project/networks/subnets/workflow/CreateSubnetInfoAction.\n\n\nHere directly create subnet, so \u0027with_subnet\u0027 input is None and must ignore.","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"43ac799d75f1a07adde7d6dc1a6f21f03d0bef26","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    check_subnet_range \u003d False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def clean(self):"},{"line_number":36,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":37,"context_line":"        self._check_subnet_data(cleaned_data, is_create\u003dTrue)"},{"line_number":38,"context_line":"        return cleaned_data"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_e6b58cec","line":35,"in_reply_to":"fa69d971_a0ae9c2b","updated":"2016-01-07 05:03:18.000000000","message":"How about changing the parent class to project_worksflows.CreateSubnetInfoAction?\nIf so, I think what we need is just L.33","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"79f0b393ecdd38c2d1390e97ec0dc015f6b4a72b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class CreateSubnetInfoAction(net_workflows.CreateSubnetInfoAction):"},{"line_number":33,"context_line":"    check_subnet_range \u003d False"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def clean(self):"},{"line_number":36,"context_line":"        cleaned_data \u003d workflows.Action.clean(self)"},{"line_number":37,"context_line":"        self._check_subnet_data(cleaned_data, is_create\u003dTrue)"},{"line_number":38,"context_line":"        return cleaned_data"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_e1101602","line":35,"in_reply_to":"fa69d971_e6b58cec","updated":"2016-01-07 06:25:30.000000000","message":"Fine, save these duplicated code.","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"}],"openstack_dashboard/dashboards/project/networks/tests.py":[{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"544f98765ffa91919822cc4569b3888274a44060","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        url \u003d reverse(\u0027horizon:project:networks:create\u0027)"},{"line_number":631,"context_line":"        res \u003d self.client.post(url, form_data)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        expected_msg \u003d \"IP addresses reserved for private networks are: \" \\"},{"line_number":634,"context_line":"                       \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \" \\"},{"line_number":635,"context_line":"                       \"V6 \u003d {fc00::/7}.\""},{"line_number":636,"context_line":"        self.assertContains(res, expected_msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_7aada930","line":633,"updated":"2014-12-22 15:36:05.000000000","message":"Use brackets to avoid backslashes:\n\n    expected_msg \u003d (\"...\"\n                    \"...\")","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"631de0e8474fca3f0c977da9549e5a57d2a0fdd4","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        url \u003d reverse(\u0027horizon:project:networks:create\u0027)"},{"line_number":631,"context_line":"        res \u003d self.client.post(url, form_data)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        expected_msg \u003d \"IP addresses reserved for private networks are: \" \\"},{"line_number":634,"context_line":"                       \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \" \\"},{"line_number":635,"context_line":"                       \"V6 \u003d {fc00::/7}.\""},{"line_number":636,"context_line":"        self.assertContains(res, expected_msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_63d88fef","line":633,"in_reply_to":"3a961159_5a561b2b","updated":"2014-12-23 13:15:58.000000000","message":"This is under pep8 check. Maybe you can submit a bp or bug in launchpad to remove all backslashes.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6da58d78d90cc67b1e3b244e0d082468f28fdf73","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        url \u003d reverse(\u0027horizon:project:networks:create\u0027)"},{"line_number":631,"context_line":"        res \u003d self.client.post(url, form_data)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        expected_msg \u003d \"IP addresses reserved for private networks are: \" \\"},{"line_number":634,"context_line":"                       \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \" \\"},{"line_number":635,"context_line":"                       \"V6 \u003d {fc00::/7}.\""},{"line_number":636,"context_line":"        self.assertContains(res, expected_msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e04e3f37","line":633,"in_reply_to":"3a961159_7aada930","updated":"2014-12-23 01:09:32.000000000","message":"This is ok, there is an example, please see Line 1939.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7bb52fe3c935d7f431befb56d21615fc0c7d7379","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        url \u003d reverse(\u0027horizon:project:networks:create\u0027)"},{"line_number":631,"context_line":"        res \u003d self.client.post(url, form_data)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        expected_msg \u003d \"IP addresses reserved for private networks are: \" \\"},{"line_number":634,"context_line":"                       \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \" \\"},{"line_number":635,"context_line":"                       \"V6 \u003d {fc00::/7}.\""},{"line_number":636,"context_line":"        self.assertContains(res, expected_msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5a561b2b","line":633,"in_reply_to":"3a961159_e04e3f37","updated":"2014-12-23 09:10:43.000000000","message":"Yup, but it clearly don\u0027t follow OpenStack Style Guidelines (and look ugly) I have no idea why it was accepted.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"2d4f47bc5bba1f9729363642c0f229209b955180","unresolved":false,"context_lines":[{"line_number":604,"context_line":"        expected_msg \u003d \"The subnet in the Network Address is too small (/32).\""},{"line_number":605,"context_line":"        self.assertContains(res, expected_msg)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    @unittest.skipIf(not getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True),"},{"line_number":608,"context_line":"                     \"Skip test if do not restrict private network cidr.\")"},{"line_number":609,"context_line":"    @test.create_stubs({api.neutron: (\u0027profile_list\u0027,)})"},{"line_number":610,"context_line":"    def test_network_create_post_with_subnet_cidr_not_reserved_range("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_8722b552","line":607,"updated":"2015-01-19 15:53:53.000000000","message":"It would be nice to see a unit test that makes sure this setting is not enforced by default, as well as this test to make sure the enforcement works when it is enabled.","commit_id":"baaeb9c265bf7bc9d4f2dfba24a275fbead7ae48"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        expected_msg \u003d (\"IP addresses allowed for user private networks are: \""},{"line_number":713,"context_line":"                        \"{\u0026#39;v4\u0026#39;: [\u0026#39;192.168.0.0/16\u0026#39;],\""},{"line_number":714,"context_line":"                        \" \u0026#39;v6\u0026#39;: []}\")"},{"line_number":715,"context_line":"        self.assertContains(res, expected_msg)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    @test.update_settings(ALLOWED_PRIVATE_NET_CIDR\u003d{\u0027v6\u0027: [\u0027fc00::/9\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_2d53a06c","line":714,"updated":"2016-01-06 16:25:11.000000000","message":"Could you encode the expected message instead of encoding manually?","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        expected_msg \u003d (\"IP addresses allowed for user private networks are: \""},{"line_number":713,"context_line":"                        \"{\u0026#39;v4\u0026#39;: [\u0026#39;192.168.0.0/16\u0026#39;],\""},{"line_number":714,"context_line":"                        \" \u0026#39;v6\u0026#39;: []}\")"},{"line_number":715,"context_line":"        self.assertContains(res, expected_msg)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    @test.update_settings(ALLOWED_PRIVATE_NET_CIDR\u003d{\u0027v6\u0027: [\u0027fc00::/9\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_0c92494c","line":714,"in_reply_to":"fa69d971_2d53a06c","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"}],"openstack_dashboard/dashboards/project/networks/workflows.py":[{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"544f98765ffa91919822cc4569b3888274a44060","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                msg \u003d _(\"The subnet in the Network Address is \""},{"line_number":187,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":188,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":189,"context_line":"            if not subnet.is_private() and \\"},{"line_number":190,"context_line":"                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True):"},{"line_number":191,"context_line":"                msg \u003d _(\"IP addresses reserved for private networks are: \""},{"line_number":192,"context_line":"                        \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9a2df5aa","line":189,"updated":"2014-12-22 15:36:05.000000000","message":"Use brackets to avoid backslash.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"631de0e8474fca3f0c977da9549e5a57d2a0fdd4","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                msg \u003d _(\"The subnet in the Network Address is \""},{"line_number":187,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":188,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":189,"context_line":"            if not subnet.is_private() and \\"},{"line_number":190,"context_line":"                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True):"},{"line_number":191,"context_line":"                msg \u003d _(\"IP addresses reserved for private networks are: \""},{"line_number":192,"context_line":"                        \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e39abf12","line":189,"in_reply_to":"3a961159_3a514f62","updated":"2014-12-23 13:15:58.000000000","message":"This is under pep8 check. Maybe you can submit a bp or bug in launchpad to remove all backslashes.","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6da58d78d90cc67b1e3b244e0d082468f28fdf73","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                msg \u003d _(\"The subnet in the Network Address is \""},{"line_number":187,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":188,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":189,"context_line":"            if not subnet.is_private() and \\"},{"line_number":190,"context_line":"                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True):"},{"line_number":191,"context_line":"                msg \u003d _(\"IP addresses reserved for private networks are: \""},{"line_number":192,"context_line":"                        \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a048b72d","line":189,"in_reply_to":"3a961159_9a2df5aa","updated":"2014-12-23 01:09:32.000000000","message":"Please see Line 184, or I will rewrite this to :\nif not ...\n   and ... :","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7bb52fe3c935d7f431befb56d21615fc0c7d7379","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                msg \u003d _(\"The subnet in the Network Address is \""},{"line_number":187,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":188,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":189,"context_line":"            if not subnet.is_private() and \\"},{"line_number":190,"context_line":"                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True):"},{"line_number":191,"context_line":"                msg \u003d _(\"IP addresses reserved for private networks are: \""},{"line_number":192,"context_line":"                        \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3a514f62","line":189,"in_reply_to":"3a961159_a048b72d","updated":"2014-12-23 09:10:43.000000000","message":"Again, it clearly don\u0027t follow OpenStack Style Guidelines and I have no idea why it was accepted, but it\u0027s not really good argument to put even more code like this. Example you provided won\u0027t work without braces (or backslash).","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"09e88c38f01adcd5d94fc1fb7f66c02e8e468330","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                msg \u003d _(\"The subnet in the Network Address is \""},{"line_number":187,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":188,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":189,"context_line":"            if not subnet.is_private() and \\"},{"line_number":190,"context_line":"                    getattr(settings, \"RESTRICT_PRIVATE_NET_CIDR\", True):"},{"line_number":191,"context_line":"                msg \u003d _(\"IP addresses reserved for private networks are: \""},{"line_number":192,"context_line":"                        \"V4 \u003d {10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3704fd48","line":189,"in_reply_to":"3a961159_e39abf12","updated":"2014-12-23 16:03:18.000000000","message":"This tool is here only to help you and the others. Citing PEP8:\n\n\"Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation.\"","commit_id":"393d75901d57b0e2af2a2fc5b612ef148e9adb67"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        self.fields[\u0027subnetpool\u0027].widget \u003d forms.HiddenInput()"},{"line_number":276,"context_line":"        self.fields[\u0027prefixlen\u0027].widget \u003d forms.HiddenInput()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _check_net_range(self, subnet, allow_cidr):"},{"line_number":279,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":280,"context_line":"        if subnet in allowed_net:"},{"line_number":281,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_7a007066","line":278,"updated":"2016-01-06 16:25:11.000000000","message":"-\u003e _check_subnet_range","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        self.fields[\u0027subnetpool\u0027].widget \u003d forms.HiddenInput()"},{"line_number":276,"context_line":"        self.fields[\u0027prefixlen\u0027].widget \u003d forms.HiddenInput()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _check_net_range(self, subnet, allow_cidr):"},{"line_number":279,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":280,"context_line":"        if subnet in allowed_net:"},{"line_number":281,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_2c7aad88","line":278,"in_reply_to":"fa69d971_7a007066","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":280,"context_line":"        if subnet in allowed_net:"},{"line_number":281,"context_line":"            return True"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,"},{"line_number":285,"context_line":"                           check_net_range\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_fa4300ad","line":282,"updated":"2016-01-06 16:25:11.000000000","message":"L.280-282 can be:\n\n    return subnet in allowed_net","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":280,"context_line":"        if subnet in allowed_net:"},{"line_number":281,"context_line":"            return True"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,"},{"line_number":285,"context_line":"                           check_net_range\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_ec6fb5c1","line":282,"in_reply_to":"fa69d971_fa4300ad","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,"},{"line_number":285,"context_line":"                           check_net_range\u003dTrue):"},{"line_number":286,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"},{"line_number":287,"context_line":"        ip_version \u003d int(cleaned_data.get(\u0027ip_version\u0027))"},{"line_number":288,"context_line":"        gateway_ip \u003d cleaned_data.get(\u0027gateway_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_3f374d4e","line":285,"updated":"2016-01-06 16:25:11.000000000","message":"How about defining check_net_range as a class attribute?\nIn addition, \u0027subnet\u0027 is better rather than \u0027net\u0027.\n\n  class CreateSubnetInfoAction(...):\n      [...]\n      check_subnet_range \u003d True\n\n      [...]\n\n      def _check_subnet-data(self, ...):\n           ....\n           if self.check_subnet_range:","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _check_subnet_data(self, cleaned_data, is_create\u003dTrue,"},{"line_number":285,"context_line":"                           check_net_range\u003dTrue):"},{"line_number":286,"context_line":"        cidr \u003d cleaned_data.get(\u0027cidr\u0027)"},{"line_number":287,"context_line":"        ip_version \u003d int(cleaned_data.get(\u0027ip_version\u0027))"},{"line_number":288,"context_line":"        gateway_ip \u003d cleaned_data.get(\u0027gateway_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_6c5c2519","line":285,"in_reply_to":"fa69d971_3f374d4e","updated":"2016-01-07 02:37:03.000000000","message":"OK, done, looks better","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":307,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"            if check_net_range:"},{"line_number":310,"context_line":"                allowed_cidr \u003d getattr("},{"line_number":311,"context_line":"                    settings, \"ALLOWED_PRIVATE_NET_CIDR\", {})"},{"line_number":312,"context_line":"                v4_range \u003d allowed_cidr.get(\u0027v4\u0027, [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_3a6758ea","line":309,"updated":"2016-01-06 16:25:11.000000000","message":"per my comment above,\n\n  if self.check_subnet_range:","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                        \"too small (/%s).\") % subnet.prefixlen"},{"line_number":307,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"            if check_net_range:"},{"line_number":310,"context_line":"                allowed_cidr \u003d getattr("},{"line_number":311,"context_line":"                    settings, \"ALLOWED_PRIVATE_NET_CIDR\", {})"},{"line_number":312,"context_line":"                v4_range \u003d allowed_cidr.get(\u0027v4\u0027, [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_0c9ec9b8","line":309,"in_reply_to":"fa69d971_3a6758ea","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"            if check_net_range:"},{"line_number":310,"context_line":"                allowed_cidr \u003d getattr("},{"line_number":311,"context_line":"                    settings, \"ALLOWED_PRIVATE_NET_CIDR\", {})"},{"line_number":312,"context_line":"                v4_range \u003d allowed_cidr.get(\u0027v4\u0027, [])"},{"line_number":313,"context_line":"                v6_range \u003d allowed_cidr.get(\u0027v6\u0027, [])"},{"line_number":314,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_0dd57ce6","line":311,"updated":"2016-01-06 16:25:11.000000000","message":"NET -\u003e SUBNET","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"            if check_net_range:"},{"line_number":310,"context_line":"                allowed_cidr \u003d getattr("},{"line_number":311,"context_line":"                    settings, \"ALLOWED_PRIVATE_NET_CIDR\", {})"},{"line_number":312,"context_line":"                v4_range \u003d allowed_cidr.get(\u0027v4\u0027, [])"},{"line_number":313,"context_line":"                v6_range \u003d allowed_cidr.get(\u0027v6\u0027, [])"},{"line_number":314,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_2ca14df8","line":311,"in_reply_to":"fa69d971_0dd57ce6","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                under_range \u003d True"},{"line_number":316,"context_line":"                if ip_version \u003d\u003d 4 and v4_range:"},{"line_number":317,"context_line":"                    for allow_cidr in v4_range:"},{"line_number":318,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":321,"context_line":"                    for allow_cidr in v6_range:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_6d119803","line":318,"updated":"2016-01-06 16:25:11.000000000","message":"under_range can be overridden,\n\nAssume that v4_range is [\u002710.0.0.0/8\u0027, \u0027192.168.0.0/16\u0027] and subnet is 10.20.30.0/24. under_range will be False.\n\nI think the logic should be:\n\n  under_range \u003d any(self._check_subnet_range(subnet, allow_cidr)\n                    for allow_cidr in v4_range)","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                under_range \u003d True"},{"line_number":316,"context_line":"                if ip_version \u003d\u003d 4 and v4_range:"},{"line_number":317,"context_line":"                    for allow_cidr in v4_range:"},{"line_number":318,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":321,"context_line":"                    for allow_cidr in v6_range:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_8cb2b94a","line":318,"in_reply_to":"fa69d971_6d119803","updated":"2016-01-07 02:37:03.000000000","message":"My bad, and done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":319,"context_line":""},{"line_number":320,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":321,"context_line":"                    for allow_cidr in v6_range:"},{"line_number":322,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_cd9e8462","line":322,"updated":"2016-01-06 16:25:11.000000000","message":"ditto","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":319,"context_line":""},{"line_number":320,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":321,"context_line":"                    for allow_cidr in v6_range:"},{"line_number":322,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_acad3dea","line":322,"in_reply_to":"fa69d971_cd9e8462","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""},{"line_number":326,"context_line":"                            \"are: %s\") % allowed_cidr"},{"line_number":327,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_6d00b866","line":325,"range":{"start_line":325,"start_character":29,"end_line":325,"end_character":41},"updated":"2016-01-06 16:25:11.000000000","message":"-\u003e CIDRs","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                        under_range \u003d self._check_net_range(subnet, allow_cidr)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""},{"line_number":326,"context_line":"                            \"are: %s\") % allowed_cidr"},{"line_number":327,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_4cb8412a","line":325,"range":{"start_line":325,"start_character":29,"end_line":325,"end_character":41},"in_reply_to":"fa69d971_6d00b866","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3fbffd3367246c63338a10601642bfc02f10fcf0","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""},{"line_number":326,"context_line":"                            \"are: %s\") % allowed_cidr"},{"line_number":327,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        if not no_gateway and gateway_ip:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_6d37584d","line":326,"updated":"2016-01-06 16:25:11.000000000","message":"I don\u0027t think we need a colon.","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bcf9af6b2facdcff3ca0c3513c8952f57716c09e","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"                if not under_range:"},{"line_number":325,"context_line":"                    msg \u003d _(\"IP addresses allowed for user private networks \""},{"line_number":326,"context_line":"                            \"are: %s\") % allowed_cidr"},{"line_number":327,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        if not no_gateway and gateway_ip:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_ec101502","line":326,"in_reply_to":"fa69d971_6d37584d","updated":"2016-01-07 02:37:03.000000000","message":"Done","commit_id":"89508aaf41b638f756a06a6cf758e4455a7289c1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"97b84397c8f53c457fb3b8dd2331e981dd168ce4","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                      for allow_cidr in v6_range)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"                if not under_range:"},{"line_number":326,"context_line":"                    msg \u003d _(\"IP CIDRs allowed for user private networks \""},{"line_number":327,"context_line":"                            \"are %s\") % allowed_cidr"},{"line_number":328,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_958cfcda","line":326,"range":{"start_line":326,"start_character":29,"end_line":326,"end_character":37},"updated":"2016-01-07 03:12:38.000000000","message":"IP CIDRs -\u003e CIDRs","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"75caaa52e95c0918efbe1c085d7b4e9d85f1b2a7","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                                      for allow_cidr in v6_range)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"                if not under_range:"},{"line_number":326,"context_line":"                    msg \u003d _(\"IP CIDRs allowed for user private networks \""},{"line_number":327,"context_line":"                            \"are %s\") % allowed_cidr"},{"line_number":328,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_40a9e022","line":326,"range":{"start_line":326,"start_character":29,"end_line":326,"end_character":37},"in_reply_to":"fa69d971_958cfcda","updated":"2016-01-07 03:55:37.000000000","message":"Done","commit_id":"8300061f3b377e8bb58de177ff811c043a957ef9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"00f35f9e20989beffb7f93215d391fad869e484e","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"                if not under_range:"},{"line_number":322,"context_line":"                    msg \u003d _(\"CIDRs allowed for user private networks \""},{"line_number":323,"context_line":"                            \"are %s\") % allowed_cidr"},{"line_number":324,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        if not no_gateway and gateway_ip:"}],"source_content_type":"text/x-python","patch_set":22,"id":"dada55a8_20ea85ac","line":323,"range":{"start_line":323,"start_character":33,"end_line":323,"end_character":36},"updated":"2016-07-21 03:38:51.000000000","message":"This returns python object dump directly.\nIt is better to format it with more readability. for example\n\n  \"CIDRs allowed for user private %(ip_ver)s networks\"\n  \"are %(allowed)s\" %\n  {\u0027ip_ver\u0027: \u0027IPv%s\u0027 % ip_version,\n   \u0027allowed\u0027: \u0027, \u0027.join(allowed_cidr)}","commit_id":"f4f17dbbe27bd64c81d951f86e7ff389dfb43732"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ed42fd20915cf2e431226b0e84deb84f8b56a60b","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"                if not under_range:"},{"line_number":322,"context_line":"                    msg \u003d _(\"CIDRs allowed for user private networks \""},{"line_number":323,"context_line":"                            \"are %s\") % allowed_cidr"},{"line_number":324,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        if not no_gateway and gateway_ip:"}],"source_content_type":"text/x-python","patch_set":22,"id":"dada55a8_f632f70e","line":323,"range":{"start_line":323,"start_character":33,"end_line":323,"end_character":36},"in_reply_to":"dada55a8_20ea85ac","updated":"2016-07-21 05:52:21.000000000","message":"Done","commit_id":"f4f17dbbe27bd64c81d951f86e7ff389dfb43732"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e23d4997baa9e60eacf7bd905d6ecbfcebe0680f","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                if ip_version \u003d\u003d 4 and v4_range:"},{"line_number":312,"context_line":"                    under_range \u003d any(self._check_subnet_range(subnet,"},{"line_number":313,"context_line":"                                                               allow_cidr)"},{"line_number":314,"context_line":"                                      for allow_cidr in v4_range)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":317,"context_line":"                    under_range \u003d any(self._check_subnet_range(subnet,"}],"source_content_type":"text/x-python","patch_set":26,"id":"9ad45d7e_8c8187fe","line":314,"range":{"start_line":314,"start_character":59,"end_line":314,"end_character":64},"updated":"2016-08-14 12:36:31.000000000","message":"This is a list, so it is better to use plural form (ranges).\n\n  v4_range -\u003e v4_ranges\n  allow_cidr -\u003e v4_range\n\n(but per my comment below this will be unnecessary)","commit_id":"808566bb6caea97f17acac4cc0ec24cfb628bed1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"551444d16a8f71a401daade03bdc2d7c35f222f8","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                if ip_version \u003d\u003d 4 and v4_range:"},{"line_number":312,"context_line":"                    under_range \u003d any(self._check_subnet_range(subnet,"},{"line_number":313,"context_line":"                                                               allow_cidr)"},{"line_number":314,"context_line":"                                      for allow_cidr in v4_range)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"                if ip_version \u003d\u003d 6 and v6_range:"},{"line_number":317,"context_line":"                    under_range \u003d any(self._check_subnet_range(subnet,"}],"source_content_type":"text/x-python","patch_set":26,"id":"3ac371cc_95f1a3d0","line":314,"range":{"start_line":314,"start_character":59,"end_line":314,"end_character":64},"in_reply_to":"9ad45d7e_8c8187fe","updated":"2016-08-15 03:11:47.000000000","message":"Done","commit_id":"808566bb6caea97f17acac4cc0ec24cfb628bed1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e23d4997baa9e60eacf7bd905d6ecbfcebe0680f","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                             \"networks are %(allowed)s.\") %"},{"line_number":326,"context_line":"                           {\u0027ip_ver\u0027: \u0027IP%s\u0027 % version_str,"},{"line_number":327,"context_line":"                            \u0027allowed\u0027: range_str})"},{"line_number":328,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        if not no_gateway and gateway_ip:"},{"line_number":331,"context_line":"            if netaddr.IPAddress(gateway_ip).version is not ip_version:"}],"source_content_type":"text/x-python","patch_set":26,"id":"9ad45d7e_ccdc1f77","line":328,"updated":"2016-08-14 12:36:31.000000000","message":"I think the logic of L.307-328 can be simplified a bit.\n\n  version_str \u003d \u0027v%s\u0027 % ip_version\n  allowed_ranges \u003d allowed_cidr.get(version_str, [])\n  if allowed_ranges:\n      under_range \u003d any(self._check_subnet_range(subnet, allowed_range)\n                        for allowed_range in allowed_ranges)\n      if not under_range:\n           range_str \u003d \u0027, \u0027.join(allowed_ranges)\n           msg \u003d ....\n           raise forms.ValidationError(msg)\n\nIn addition, it is better to make L.305-328 a separate method for readability.","commit_id":"808566bb6caea97f17acac4cc0ec24cfb628bed1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"551444d16a8f71a401daade03bdc2d7c35f222f8","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                             \"networks are %(allowed)s.\") %"},{"line_number":326,"context_line":"                           {\u0027ip_ver\u0027: \u0027IP%s\u0027 % version_str,"},{"line_number":327,"context_line":"                            \u0027allowed\u0027: range_str})"},{"line_number":328,"context_line":"                    raise forms.ValidationError(msg)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        if not no_gateway and gateway_ip:"},{"line_number":331,"context_line":"            if netaddr.IPAddress(gateway_ip).version is not ip_version:"}],"source_content_type":"text/x-python","patch_set":26,"id":"3ac371cc_b5be5fd2","line":328,"in_reply_to":"9ad45d7e_ccdc1f77","updated":"2016-08-15 03:11:47.000000000","message":"Done","commit_id":"808566bb6caea97f17acac4cc0ec24cfb628bed1"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"04398f7838b54d8d3ee61338f3248dd762f1c4b0","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":275,"context_line":"        return subnet in allowed_net"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _check_cidr_allowed(self, ip_version, subnet):"},{"line_number":278,"context_line":"        if self.check_subnet_range:"},{"line_number":279,"context_line":"            allowed_cidr \u003d getattr("},{"line_number":280,"context_line":"                settings, \"ALLOWED_PRIVATE_SUBNET_CIDR\", {})"}],"source_content_type":"text/x-python","patch_set":27,"id":"3ac371cc_b655c6c7","line":277,"updated":"2016-08-15 04:00:03.000000000","message":"(no action needed) personally I prefer to the following pattern to avoid deep indent level.\n\n  if not self.check_subnet_range:\n      return\n\n  allow_cidr \u003d getattr(....)\n  version_str \u003d ...\n  allowed_ranges \u003d ....\n  if not allowed_ranges:\n      return\n\n  under_range \u003d any(....)\n  ....","commit_id":"f0c6d32261fceab3a857bc6ddc9634df0ad4d31a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"df43683cf3c549ecd602e938fa05e6ef64852c60","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        allowed_net \u003d netaddr.IPNetwork(allow_cidr)"},{"line_number":275,"context_line":"        return subnet in allowed_net"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _check_cidr_allowed(self, ip_version, subnet):"},{"line_number":278,"context_line":"        if self.check_subnet_range:"},{"line_number":279,"context_line":"            allowed_cidr \u003d getattr("},{"line_number":280,"context_line":"                settings, \"ALLOWED_PRIVATE_SUBNET_CIDR\", {})"}],"source_content_type":"text/x-python","patch_set":27,"id":"3ac371cc_99b6fd3b","line":277,"in_reply_to":"3ac371cc_b655c6c7","updated":"2016-08-15 05:05:57.000000000","message":"Done","commit_id":"f0c6d32261fceab3a857bc6ddc9634df0ad4d31a"}],"openstack_dashboard/local/local_settings.py.example":[{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"2d4f47bc5bba1f9729363642c0f229209b955180","unresolved":false,"context_lines":[{"line_number":539,"context_line":"# OPENSTACK_TOKEN_HASH_ALGORITHM \u003d \u0027md5\u0027"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"# To restrict user private network cidr input."},{"line_number":542,"context_line":"RESTRICT_PRIVATE_NET_CIDR \u003d False"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"3a961159_87c6359b","line":542,"updated":"2015-01-19 15:53:53.000000000","message":"The description should be more complete here, and I\u0027d expect like the other configuration options, it should be documented in doc/source/topics/settings.rst.  I\u0027d expect to see the default value encoded in settings.py and a commented out version here with the description for deployers to override.\n\nMaybe \"Restrict private networks  to be only in the private network ranges specified by RFC 1918\"","commit_id":"baaeb9c265bf7bc9d4f2dfba24a275fbead7ae48"}],"openstack_dashboard/test/settings.py":[{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"f803a6e3d5ad451fcaaa6ca09ec1d3beae4351e7","unresolved":false,"context_lines":[{"line_number":236,"context_line":"REST_API_SECURITY \u003d \u0027SECURITY\u0027"},{"line_number":237,"context_line":"REST_API_REQUIRED_SETTINGS \u003d [\u0027REST_API_SETTING_1\u0027]"},{"line_number":238,"context_line":"REST_API_ADDITIONAL_SETTINGS \u003d [\u0027REST_API_SETTING_2\u0027]"},{"line_number":239,"context_line":"OPENSTACK_KEYSTONE_ADMIN_ROLES \u003d [\u0027foO\u0027, \u0027BAR\u0027, \u0027admin\u0027]"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [], \u0027v6\u0027: []}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7aa08908_62f8227d","line":239,"updated":"2016-06-17 20:22:01.000000000","message":"Is this line relevant to the patch?","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"43e50d22537a75f3d336cd590828164c373dc3e7","unresolved":false,"context_lines":[{"line_number":236,"context_line":"REST_API_SECURITY \u003d \u0027SECURITY\u0027"},{"line_number":237,"context_line":"REST_API_REQUIRED_SETTINGS \u003d [\u0027REST_API_SETTING_1\u0027]"},{"line_number":238,"context_line":"REST_API_ADDITIONAL_SETTINGS \u003d [\u0027REST_API_SETTING_2\u0027]"},{"line_number":239,"context_line":"OPENSTACK_KEYSTONE_ADMIN_ROLES \u003d [\u0027foO\u0027, \u0027BAR\u0027, \u0027admin\u0027]"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"ALLOWED_PRIVATE_SUBNET_CIDR \u003d {\u0027v4\u0027: [], \u0027v6\u0027: []}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7aa08908_5f89786e","line":239,"in_reply_to":"7aa08908_62f8227d","updated":"2016-06-18 02:43:00.000000000","message":"Done, and removed.","commit_id":"9c8f71bae01b51cf0a528a4cdb785af3aaaea5ec"}],"releasenotes/notes/bp-restrict-private-network-input-5e5bd5978b273c62.yaml":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3136d76c8a467d3f37f3f584da7458efb8f93b62","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to restrict user private network cidr input \u003chttps://blueprints.launchpad.net/horizon/+spec/allow-launching-ports\u003e"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3ac371cc_794b412c","line":3,"range":{"start_line":3,"start_character":14,"end_line":3,"end_character":54},"updated":"2016-08-15 05:13:14.000000000","message":"I\u0027d suggest:\n\n  restrict CIDR range for user private network\n\ncidr -\u003e CIDR","commit_id":"1ccfef6c42c831033f7b4d9dc0144a979d1eaa15"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3136d76c8a467d3f37f3f584da7458efb8f93b62","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to restrict user private network cidr input \u003chttps://blueprints.launchpad.net/horizon/+spec/allow-launching-ports\u003e"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3ac371cc_f93611b3","line":3,"range":{"start_line":3,"start_character":103,"end_line":3,"end_character":124},"updated":"2016-08-15 05:13:14.000000000","message":"restrict-private-network-input?","commit_id":"1ccfef6c42c831033f7b4d9dc0144a979d1eaa15"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8c38311bc253ebdef0cbf70c09f0cb8c27281572","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to restrict user private network cidr input \u003chttps://blueprints.launchpad.net/horizon/+spec/allow-launching-ports\u003e"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3ac371cc_9900bdac","line":3,"range":{"start_line":3,"start_character":14,"end_line":3,"end_character":54},"in_reply_to":"3ac371cc_794b412c","updated":"2016-08-15 05:18:55.000000000","message":"Done","commit_id":"1ccfef6c42c831033f7b4d9dc0144a979d1eaa15"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8c38311bc253ebdef0cbf70c09f0cb8c27281572","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to restrict user private network cidr input \u003chttps://blueprints.launchpad.net/horizon/+spec/allow-launching-ports\u003e"}],"source_content_type":"text/x-yaml","patch_set":28,"id":"3ac371cc_f92bb131","line":3,"range":{"start_line":3,"start_character":103,"end_line":3,"end_character":124},"in_reply_to":"3ac371cc_f93611b3","updated":"2016-08-15 05:18:55.000000000","message":"..., I\u0027ve changed that, vim fools me... Done","commit_id":"1ccfef6c42c831033f7b4d9dc0144a979d1eaa15"}]}
