)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"311644ce19b6b83d252074cbca3a73457af60ec9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"602d471e_a0e02d53","updated":"2024-06-27 13:13:31.000000000","message":"lgtm","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6c9cb9f5_674c40b8","updated":"2024-06-19 15:53:09.000000000","message":"recheck timeout","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"9839e2db342063952329d8655e6f2f627afa33d2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7a9f5629_f442e540","updated":"2024-06-21 02:35:32.000000000","message":"thanks for updates, lgtm","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"}],"nova/api/openstack/compute/schemas/security_group_default_rules.py":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"311644ce19b6b83d252074cbca3a73457af60ec9","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"4dc7780e_32f59d5b","line":1,"updated":"2024-06-27 13:13:31.000000000","message":"Copyright !","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6acf14ec2e2e3bf4f19ee0510a0a87d733d0783a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"85497baa_8e46f3a8","line":1,"in_reply_to":"023ec525_47bda4a0","updated":"2024-06-27 17:29:14.000000000","message":"i generally try not to add copy right noticves so i would prefer if we avoided doing that.\n\nif we were to add one it woudl have to be a redhat one becuase we are not allowed to add noticies on behalf of the foundation without being foundation staff.\n\nwe inentionally only check for the license and not a copyright notice in the ci because  only the license is requried.","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b77d997b5f24a3062174e18e275e74b0dbdc0669","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"4ee0220c_b3cf88c8","line":1,"in_reply_to":"4dc7780e_32f59d5b","updated":"2024-06-27 13:45:12.000000000","message":"Huh?","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"f94e31630a42fb87d3e3f75d9a6c622367db4063","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"023ec525_47bda4a0","line":1,"in_reply_to":"4ee0220c_b3cf88c8","updated":"2024-06-27 13:59:16.000000000","message":"just wanna highlight, that copyright line, like below is missing and its present in all modules.\n`# Copyright 2013 OpenStack Foundation`\n\nis there a particular reason, its not added for this module.","commit_id":"847608e75a13328cafd134db8b2f2eece36c7af3"}],"nova/api/openstack/compute/schemas/security_groups.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":20,"context_line":"        \u0027security_group\u0027: {"},{"line_number":21,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":22,"context_line":"            \u0027properties\u0027: {"},{"line_number":23,"context_line":"                \u0027name\u0027: {"},{"line_number":24,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":25,"context_line":"                    \u0027minLength\u0027: 0,"},{"line_number":26,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":27,"context_line":"                },"},{"line_number":28,"context_line":"                \u0027description\u0027: {"},{"line_number":29,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":30,"context_line":"                    \u0027minLength\u0027: 0,"},{"line_number":31,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"}],"source_content_type":"text/x-python","patch_set":1,"id":"8a271401_a78c7c08","line":32,"range":{"start_line":23,"start_character":0,"end_line":32,"end_character":18},"updated":"2024-06-15 00:10:35.000000000","message":"This is correct and as per current behavior and what we test in tempest https://github.com/openstack/tempest/blob/3619d297d57c719d2f297f16e8867b5b4f7abf20/tempest/api/compute/security_groups/test_security_groups_negative.py#L51-L78","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        \u0027security_group\u0027: {"},{"line_number":21,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":22,"context_line":"            \u0027properties\u0027: {"},{"line_number":23,"context_line":"                \u0027name\u0027: {"},{"line_number":24,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":25,"context_line":"                    \u0027minLength\u0027: 0,"},{"line_number":26,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":27,"context_line":"                },"},{"line_number":28,"context_line":"                \u0027description\u0027: {"},{"line_number":29,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":30,"context_line":"                    \u0027minLength\u0027: 0,"},{"line_number":31,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"}],"source_content_type":"text/x-python","patch_set":1,"id":"8942023e_07162ac9","line":32,"range":{"start_line":23,"start_character":0,"end_line":32,"end_character":18},"in_reply_to":"8a271401_a78c7c08","updated":"2024-06-19 15:53:09.000000000","message":"Acknowledged","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":31,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"},{"line_number":36,"context_line":"            \u0027additionalProperties\u0027: True,"},{"line_number":37,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":1,"id":"4d68ad3c_e70a2b2d","line":34,"range":{"start_line":34,"start_character":34,"end_line":34,"end_character":45},"updated":"2024-06-15 00:10:35.000000000","message":"\u0027description\u0027 itself is not a mandatory parameter and  default description in neutron is an empty string but nova code validate it as string and when not passed then None is validated and it raise 400 error.\n\n- https://github.com/openstack/nova/blob/7dc4b1ea627d864a0ee2745cc9de4336fc0ba7b5/nova/api/openstack/compute/security_groups.py#L224\n\nso making it mandatory is ok here which does not change the current behaviour.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                    \u0027maxLength\u0027: 255,"},{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"},{"line_number":36,"context_line":"            \u0027additionalProperties\u0027: True,"},{"line_number":37,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":1,"id":"423a3f90_48203cca","line":34,"range":{"start_line":34,"start_character":34,"end_line":34,"end_character":45},"in_reply_to":"4d68ad3c_e70a2b2d","updated":"2024-06-19 15:53:09.000000000","message":"Acknowledged","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"},{"line_number":36,"context_line":"            \u0027additionalProperties\u0027: True,"},{"line_number":37,"context_line":"        },"},{"line_number":38,"context_line":"    },"},{"line_number":39,"context_line":"    \u0027required\u0027: [\u0027security_group\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"e47dc467_86840b45","line":36,"range":{"start_line":35,"start_character":10,"end_line":36,"end_character":41},"updated":"2024-06-15 00:10:35.000000000","message":"++, thanks this will make sure we do not break any current usage even they are sending extra unknown parameter in request.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                },"},{"line_number":33,"context_line":"            },"},{"line_number":34,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027description\u0027],"},{"line_number":35,"context_line":"            # NOTE(stephenfin): Per gmann\u0027s note below"},{"line_number":36,"context_line":"            \u0027additionalProperties\u0027: True,"},{"line_number":37,"context_line":"        },"},{"line_number":38,"context_line":"    },"},{"line_number":39,"context_line":"    \u0027required\u0027: [\u0027security_group\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"1579964d_aba431c5","line":36,"range":{"start_line":35,"start_character":10,"end_line":36,"end_character":41},"in_reply_to":"e47dc467_86840b45","updated":"2024-06-19 15:53:09.000000000","message":"Acknowledged","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":49,"context_line":"        \u0027security_group_rule\u0027: {"},{"line_number":50,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":51,"context_line":"            \u0027properties\u0027: {"},{"line_number":52,"context_line":"                \u0027rule_id\u0027: {"},{"line_number":53,"context_line":"                    \u0027type\u0027: [\u0027string\u0027, \u0027null\u0027],"},{"line_number":54,"context_line":"                    \u0027format\u0027: \u0027uuid\u0027,"},{"line_number":55,"context_line":"                },"}],"source_content_type":"text/x-python","patch_set":1,"id":"819f0a3a_099c8379","line":52,"range":{"start_line":52,"start_character":17,"end_line":52,"end_character":24},"updated":"2024-06-15 00:10:35.000000000","message":"this is \u0027group_id\u0027 not the \u0027rule_id\u0027\n- https://github.com/openstack/nova/blob/7dc4b1ea627d864a0ee2745cc9de4336fc0ba7b5/nova/api/openstack/compute/security_groups.py#L281C33-L281C41","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \u0027security_group_rule\u0027: {"},{"line_number":50,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":51,"context_line":"            \u0027properties\u0027: {"},{"line_number":52,"context_line":"                \u0027rule_id\u0027: {"},{"line_number":53,"context_line":"                    \u0027type\u0027: [\u0027string\u0027, \u0027null\u0027],"},{"line_number":54,"context_line":"                    \u0027format\u0027: \u0027uuid\u0027,"},{"line_number":55,"context_line":"                },"}],"source_content_type":"text/x-python","patch_set":1,"id":"486f5d11_14f3befc","line":52,"range":{"start_line":52,"start_character":17,"end_line":52,"end_character":24},"in_reply_to":"819f0a3a_099c8379","updated":"2024-06-19 15:53:09.000000000","message":"Ah, good catch. The schema didn\u0027t/couldn\u0027t catch this because `additionalProperties \u003d True` 😞\n\nDone.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":59,"context_line":"                },"},{"line_number":60,"context_line":"                # NOTE(stephenfin): We never validated these and we\u0027re not"},{"line_number":61,"context_line":"                # going to add that validation now."},{"line_number":62,"context_line":"                \u0027to_port\u0027: {},"},{"line_number":63,"context_line":"                \u0027from_port\u0027: {},"},{"line_number":64,"context_line":"                \u0027ip_protocol\u0027: {},"},{"line_number":65,"context_line":"                \u0027cidr\u0027: {},"},{"line_number":66,"context_line":"            },"},{"line_number":67,"context_line":"            \u0027required\u0027: [\u0027parent_group_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"a482bedd_e2cf158d","line":64,"range":{"start_line":62,"start_character":1,"end_line":64,"end_character":34},"updated":"2024-06-15 00:10:35.000000000","message":"I think these are required parameter but as you mentioned in comment I am also not particular to add these in required field so ok for me.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"}],"nova/api/openstack/compute/security_group_default_rules.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ebfe8b4f40ba8618788e7f2104e79bb0b49c7288","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from webob import exc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova.api.openstack.compute.schemas import security_group_default_rules as schema  # noqa: E501"},{"line_number":18,"context_line":"from nova.api.openstack import wsgi"},{"line_number":19,"context_line":"from nova.api import validation"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e910f747_bfcac3f1","line":17,"updated":"2024-04-19 10:09:52.000000000","message":"im torn i hate using \\ for line continutation but i prefer not to add # noqa if we cna avoid it","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2b94217cf6cb5fa0c31926bb906369ce1d1541fb","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from webob import exc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova.api.openstack.compute.schemas import security_group_default_rules as schema  # noqa: E501"},{"line_number":18,"context_line":"from nova.api.openstack import wsgi"},{"line_number":19,"context_line":"from nova.api import validation"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"6e527869_10043e8e","line":17,"in_reply_to":"e910f747_bfcac3f1","updated":"2024-04-19 10:29:18.000000000","message":"Fair. I do think limited use of targetted `noqa` like this can make sense to avoid wrapping stuff unnecessarily.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"}],"nova/api/openstack/compute/security_groups.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ebfe8b4f40ba8618788e7f2104e79bb0b49c7288","unresolved":true,"context_lines":[{"line_number":131,"context_line":"                            SG_NOT_FOUND)"},{"line_number":132,"context_line":"        return group_rule_data_by_rule_group_id"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _from_body(self, body, key):"},{"line_number":135,"context_line":"        if not body:"},{"line_number":136,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":137,"context_line":"                explanation\u003d_(\"The request body can\u0027t be empty\"))"},{"line_number":138,"context_line":"        value \u003d body.get(key, None)"},{"line_number":139,"context_line":"        if value is None:"},{"line_number":140,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":141,"context_line":"                explanation\u003d_(\"Missing parameter %s\") % key)"},{"line_number":142,"context_line":"        return value"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class SecurityGroupController(SecurityGroupControllerBase, wsgi.Controller):"},{"line_number":146,"context_line":"    \"\"\"The Security group API controller for the OpenStack API.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"ab0d49e7_e12b3f10","side":"PARENT","line":143,"range":{"start_line":134,"start_character":3,"end_line":143,"end_character":0},"updated":"2024-04-19 10:09:52.000000000","message":"so this is not requred because the sceme validation yes?","commit_id":"233fe1865feab34d7d75332267613e640d8f552f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                            SG_NOT_FOUND)"},{"line_number":132,"context_line":"        return group_rule_data_by_rule_group_id"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _from_body(self, body, key):"},{"line_number":135,"context_line":"        if not body:"},{"line_number":136,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":137,"context_line":"                explanation\u003d_(\"The request body can\u0027t be empty\"))"},{"line_number":138,"context_line":"        value \u003d body.get(key, None)"},{"line_number":139,"context_line":"        if value is None:"},{"line_number":140,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":141,"context_line":"                explanation\u003d_(\"Missing parameter %s\") % key)"},{"line_number":142,"context_line":"        return value"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class SecurityGroupController(SecurityGroupControllerBase, wsgi.Controller):"},{"line_number":146,"context_line":"    \"\"\"The Security group API controller for the OpenStack API.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"257797ac_9d3d6171","side":"PARENT","line":143,"range":{"start_line":134,"start_character":3,"end_line":143,"end_character":0},"in_reply_to":"724df525_4c5d0872","updated":"2024-06-15 00:10:35.000000000","message":"++","commit_id":"233fe1865feab34d7d75332267613e640d8f552f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2b94217cf6cb5fa0c31926bb906369ce1d1541fb","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                            SG_NOT_FOUND)"},{"line_number":132,"context_line":"        return group_rule_data_by_rule_group_id"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _from_body(self, body, key):"},{"line_number":135,"context_line":"        if not body:"},{"line_number":136,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":137,"context_line":"                explanation\u003d_(\"The request body can\u0027t be empty\"))"},{"line_number":138,"context_line":"        value \u003d body.get(key, None)"},{"line_number":139,"context_line":"        if value is None:"},{"line_number":140,"context_line":"            raise exc.HTTPBadRequest("},{"line_number":141,"context_line":"                explanation\u003d_(\"Missing parameter %s\") % key)"},{"line_number":142,"context_line":"        return value"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class SecurityGroupController(SecurityGroupControllerBase, wsgi.Controller):"},{"line_number":146,"context_line":"    \"\"\"The Security group API controller for the OpenStack API.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"724df525_4c5d0872","side":"PARENT","line":143,"range":{"start_line":134,"start_character":3,"end_line":143,"end_character":0},"in_reply_to":"ab0d49e7_e12b3f10","updated":"2024-04-19 10:29:18.000000000","message":"Exactly. Looking at [the schema](https://review.opendev.org/c/openstack/nova/+/915733/1/nova/api/openstack/compute/schemas/security_groups.py), `type: \"object\"` will ensure the body is not empty, while `required: [\"security_group\"]` and `required: [\"security_group_rule\"]` will ensure the relevant key is set.","commit_id":"233fe1865feab34d7d75332267613e640d8f552f"}],"nova/network/security_group_api.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ebfe8b4f40ba8618788e7f2104e79bb0b49c7288","unresolved":true,"context_lines":[{"line_number":213,"context_line":"                     Neutron is allowing any characters."},{"line_number":214,"context_line":"    \"\"\""},{"line_number":215,"context_line":"    utils.check_string_length(value, name\u003dproperty, min_length\u003d0,"},{"line_number":216,"context_line":"                              max_length\u003d255)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"def populate_security_groups(security_groups):"}],"source_content_type":"text/x-python","patch_set":1,"id":"24a68f64_98d5eaf0","side":"PARENT","line":216,"updated":"2024-04-19 10:09:52.000000000","message":"this is now enforeced in the schema \nhttps://review.opendev.org/c/openstack/nova/+/915733/1/nova/api/openstack/compute/schemas/security_groups.py#26\n+1","commit_id":"233fe1865feab34d7d75332267613e640d8f552f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2b94217cf6cb5fa0c31926bb906369ce1d1541fb","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                     Neutron is allowing any characters."},{"line_number":214,"context_line":"    \"\"\""},{"line_number":215,"context_line":"    utils.check_string_length(value, name\u003dproperty, min_length\u003d0,"},{"line_number":216,"context_line":"                              max_length\u003d255)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"def populate_security_groups(security_groups):"}],"source_content_type":"text/x-python","patch_set":1,"id":"aebe13c3_cc16cbdf","side":"PARENT","line":216,"in_reply_to":"24a68f64_98d5eaf0","updated":"2024-04-19 10:29:18.000000000","message":"Acknowledged","commit_id":"233fe1865feab34d7d75332267613e640d8f552f"}],"nova/tests/unit/api/openstack/compute/test_security_groups.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"63c5b0fed4dc213fa4cebdf94346fb11604d7271","unresolved":true,"context_lines":[{"line_number":1425,"context_line":"    def test_create_rule_cidr_bad_netmask(self):"},{"line_number":1426,"context_line":"        rule \u003d security_group_rule_template(cidr\u003d\u002715.0.0.0/0\u0027)"},{"line_number":1427,"context_line":"        self.assertRaises("},{"line_number":1428,"context_line":"            webob.exc.HTTPNotFound, self.controller.create,"},{"line_number":1429,"context_line":"            self.req, body\u003d{\u0027security_group_rule\u0027: rule})"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"56aa126a_9dc16988","line":1428,"range":{"start_line":1428,"start_character":22,"end_line":1428,"end_character":34},"updated":"2024-06-15 00:10:35.000000000","message":"curious on this change, what caused HTTPBadRequest - \u003e HTTPNotFound ?","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a2db8531900cdf348fd3852c0e96157237ad9ce6","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"    def test_create_rule_cidr_bad_netmask(self):"},{"line_number":1426,"context_line":"        rule \u003d security_group_rule_template(cidr\u003d\u002715.0.0.0/0\u0027)"},{"line_number":1427,"context_line":"        self.assertRaises("},{"line_number":1428,"context_line":"            webob.exc.HTTPNotFound, self.controller.create,"},{"line_number":1429,"context_line":"            self.req, body\u003d{\u0027security_group_rule\u0027: rule})"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f2ac6302_6ba05017","line":1428,"range":{"start_line":1428,"start_character":22,"end_line":1428,"end_character":34},"in_reply_to":"56aa126a_9dc16988","updated":"2024-06-19 15:53:09.000000000","message":"Small bit of a rabbit hole, this one. This test was introduced in I3fc05371f461112feae4f1097777fede5fc6b948 and was supposed to test that CIDRs ending in `/0` were forbidden. However, we have not been getting that far for some time since the default `security_group_id` in `rule` (i.e. generated by `security_group_rule_template`) is an integer (`2`) and not valid with neutron. I changed the integer to a UUID so we now get further in the code before failing (due to a missing security group). I\u0027ve updated this so that it goes a bit further again.","commit_id":"c3fb1eaf374a30c104068bf0d5bccbb33b0ec312"}]}
