)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"869e04602e6e3fd004bb88f9ea480ce533ffe3c0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"d45c823e_9f40b780","updated":"2021-12-14 18:49:13.000000000","message":"Code looks fine to me, but could you help me to test this patch in horizon.\nI mean Could you explain the steps I have to do to get this newly added \u0027shared\u0027\ncolumn in horizon? ","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"277676ebf2f5e13cde58a96c498efa3fe95e0430","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"a39bc089_35f4e965","updated":"2021-12-15 07:20:41.000000000","message":"LGTM, tested with devstack.\nwait for amotoki if he like to add anything here.","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"4016f4ad6e0beb9ac7f5814dbde2cb709fcc8932","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"2f49d008_ad384ef8","updated":"2021-10-22 15:27:56.000000000","message":"recheck","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"277676ebf2f5e13cde58a96c498efa3fe95e0430","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"d09a718f_60971b6d","in_reply_to":"aef74628_6a12fd51","updated":"2021-12-15 07:20:41.000000000","message":"ack, how can I set \u0027shared\u0027 value to True using neutron cli?\nAny command or doc link, please?","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"31a3b2b71c624e544cdcf74085dc5ddda5d4d981","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"cb66fbcb_4675382e","in_reply_to":"d09a718f_60971b6d","updated":"2021-12-15 19:07:58.000000000","message":"As an SG owner, you can create an RBAC policy to share the SG for another tenant X. Then login to horizon as tenant X, you should see the SG with shared\u003dtrue. https://docs.openstack.org/neutron/latest/admin/config-rbac.html#sharing-a-security-group-with-specific-projects","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"e010d6ce1a6e9ac2bec27d565033be440c20de13","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"aef74628_6a12fd51","in_reply_to":"d45c823e_9f40b780","updated":"2021-12-14 19:01:01.000000000","message":"Assuming you\u0027re using devstack for testing. First, you need to install the latest Neutron to get the neutron-server side change: https://review.opendev.org/c/openstack/neutron/+/811242. Then you can cherry-pick this patch to your local horizon repo and set COMPRESS_OFFLINE \u003d False in the local_settings.py so the code change can be effective. And after restarting apache2, you should be able to see the shared field and shared SGs in the horizon UI.","commit_id":"c7ea66bc3ede39fcc2d341312c741d662dc4cf7e"}],"openstack_dashboard/api/neutron.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"d94e26faece78905ac9abdb2d662aac204a69005","unresolved":true,"context_lines":[{"line_number":329,"context_line":"    * name"},{"line_number":330,"context_line":"    * description"},{"line_number":331,"context_line":"    * tenant_id"},{"line_number":332,"context_line":"    * shared: A boolean either the security group is shared to the tenant"},{"line_number":333,"context_line":"    * rules: A list of SecurityGroupRule objects"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    SecurityGroupRule object should have the following attributes"}],"source_content_type":"text/x-python","patch_set":3,"id":"cd94eb42_3dc3914a","line":332,"updated":"2021-09-30 09:22:50.000000000","message":"Can you rephrase this, because I can\u0027t understand this sentence?","commit_id":"558eba317e7401a5863f035d5cc0c9216c49e6eb"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"ee78aad30628199252d200ddd0357b83846a0020","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    * name"},{"line_number":330,"context_line":"    * description"},{"line_number":331,"context_line":"    * tenant_id"},{"line_number":332,"context_line":"    * shared: A boolean either the security group is shared to the tenant"},{"line_number":333,"context_line":"    * rules: A list of SecurityGroupRule objects"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    SecurityGroupRule object should have the following attributes"}],"source_content_type":"text/x-python","patch_set":3,"id":"2c84448a_b52567a8","line":332,"in_reply_to":"cd94eb42_3dc3914a","updated":"2021-09-30 20:04:09.000000000","message":"Done","commit_id":"558eba317e7401a5863f035d5cc0c9216c49e6eb"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"d94e26faece78905ac9abdb2d662aac204a69005","unresolved":true,"context_lines":[{"line_number":364,"context_line":"            secgroups_rbac \u003d self.client.list_security_groups(**filters)"},{"line_number":365,"context_line":"            return [SecurityGroup(sg) for sg in"},{"line_number":366,"context_line":"                    secgroups_owned.get(\u0027security_groups\u0027) +"},{"line_number":367,"context_line":"                    secgroups_rbac.get(\u0027security_groups\u0027)]"},{"line_number":368,"context_line":"        secgroups \u003d self.client.list_security_groups(**filters)"},{"line_number":369,"context_line":"        return [SecurityGroup(sg) for sg in secgroups.get(\u0027security_groups\u0027)]"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7047ad68_b4997bee","line":367,"updated":"2021-09-30 09:22:50.000000000","message":"I think you want to use itertools.chain instead of + here. https://docs.python.org/3/library/itertools.html#itertools.chain","commit_id":"558eba317e7401a5863f035d5cc0c9216c49e6eb"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"ee78aad30628199252d200ddd0357b83846a0020","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            secgroups_rbac \u003d self.client.list_security_groups(**filters)"},{"line_number":365,"context_line":"            return [SecurityGroup(sg) for sg in"},{"line_number":366,"context_line":"                    secgroups_owned.get(\u0027security_groups\u0027) +"},{"line_number":367,"context_line":"                    secgroups_rbac.get(\u0027security_groups\u0027)]"},{"line_number":368,"context_line":"        secgroups \u003d self.client.list_security_groups(**filters)"},{"line_number":369,"context_line":"        return [SecurityGroup(sg) for sg in secgroups.get(\u0027security_groups\u0027)]"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"25280927_c59229be","line":367,"in_reply_to":"7047ad68_b4997bee","updated":"2021-09-30 20:04:09.000000000","message":"Done","commit_id":"558eba317e7401a5863f035d5cc0c9216c49e6eb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"55bf915014bc279d6db2c99ca5bc804918ab0b4f","unresolved":true,"context_lines":[{"line_number":20,"context_line":"import collections"},{"line_number":21,"context_line":"from collections.abc import Sequence"},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from itertools import chain"},{"line_number":24,"context_line":"import logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import netaddr"}],"source_content_type":"text/x-python","patch_set":4,"id":"6f80d359_bf17a2c0","line":23,"updated":"2021-10-18 16:45:19.000000000","message":"nit: Could you use a module-level import rather than an attribute-level import?","commit_id":"8552b231168b045c658bd2257a41bb9154a34745"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"bed6889bb9c71184bc436d02fa1d6926c4056e70","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import collections"},{"line_number":21,"context_line":"from collections.abc import Sequence"},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from itertools import chain"},{"line_number":24,"context_line":"import logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import netaddr"}],"source_content_type":"text/x-python","patch_set":4,"id":"4640d888_acc3b6fa","line":23,"in_reply_to":"6f80d359_bf17a2c0","updated":"2021-10-18 20:41:34.000000000","message":"Done","commit_id":"8552b231168b045c658bd2257a41bb9154a34745"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"55bf915014bc279d6db2c99ca5bc804918ab0b4f","unresolved":true,"context_lines":[{"line_number":360,"context_line":"                is_extension_supported("},{"line_number":361,"context_line":"                    self.request, \u0027security-groups-shared-filtering\u0027)):"},{"line_number":362,"context_line":"            # NOTE(hangyang): Get the SGs owned and shared to the tenant"},{"line_number":363,"context_line":"            filters[\"shared\"] \u003d False"},{"line_number":364,"context_line":"            secgroups_owned \u003d self.client.list_security_groups(**filters)"},{"line_number":365,"context_line":"            filters.pop(\"tenant_id\")"},{"line_number":366,"context_line":"            filters[\"shared\"] \u003d True"},{"line_number":367,"context_line":"            secgroups_rbac \u003d self.client.list_security_groups(**filters)"}],"source_content_type":"text/x-python","patch_set":6,"id":"52cfbefa_80ea41c4","line":364,"range":{"start_line":363,"start_character":11,"end_line":364,"end_character":73},"updated":"2021-10-18 16:45:19.000000000","message":"question (and confirmation inclding me): We need to check the neutron behavior when the API is called with admin role. What SG are returned? All \"shared\" SGs from all projects, or \"shared\" SGs shared to a target project? If the answer is former, it breaks the expectation in horizon (because the returned list is used when launching an instance).\n\nIIUC perhaps it is the most tricky point when supportng \"shared\" somthing. From the same reason, horizon does not provide a good support for RBAC networks in case of admin role.\n\nAs compromise, we can support RBAC resources only for non-admin users and allow some heavy operations for admin users, but ....\n\nPerhaps \"all_projects\u003dTrue/False\" discussion in neutron might be needed to revive for a perfect support (but it will take time).","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"bed6889bb9c71184bc436d02fa1d6926c4056e70","unresolved":true,"context_lines":[{"line_number":360,"context_line":"                is_extension_supported("},{"line_number":361,"context_line":"                    self.request, \u0027security-groups-shared-filtering\u0027)):"},{"line_number":362,"context_line":"            # NOTE(hangyang): Get the SGs owned and shared to the tenant"},{"line_number":363,"context_line":"            filters[\"shared\"] \u003d False"},{"line_number":364,"context_line":"            secgroups_owned \u003d self.client.list_security_groups(**filters)"},{"line_number":365,"context_line":"            filters.pop(\"tenant_id\")"},{"line_number":366,"context_line":"            filters[\"shared\"] \u003d True"},{"line_number":367,"context_line":"            secgroups_rbac \u003d self.client.list_security_groups(**filters)"}],"source_content_type":"text/x-python","patch_set":6,"id":"b1d44924_8cac7dc1","line":364,"range":{"start_line":363,"start_character":11,"end_line":364,"end_character":73},"in_reply_to":"52cfbefa_80ea41c4","updated":"2021-10-18 20:41:34.000000000","message":"Good question. I have tested and confirmed the API behavior is the second case that given an admin role, it returns SGs shared to the target project too instead of all the shared SGs for any project. I have also added notes to the inline comment.\n\nFor more details, the shared field of networks/SGs is determined strictly by checking if the requester\u0027s project id is in the target projects of the object rbac entries: https://github.com/openstack/neutron/blob/b78771bbd58d34ff5a4872a666ce25110b5f2bb6/neutron/objects/rbac_db.py#L54-L63 And it works the same for admin and non-admin tenants.","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"}],"openstack_dashboard/test/unit/api/test_neutron.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"55bf915014bc279d6db2c99ca5bc804918ab0b4f","unresolved":true,"context_lines":[{"line_number":1192,"context_line":"            rets \u003d api.neutron.security_group_list(self.request, **params)"},{"line_number":1193,"context_line":"        self.assertEqual(len(sgs), len(rets))"},{"line_number":1194,"context_line":"        for (exp, ret) in zip(sgs, rets):"},{"line_number":1195,"context_line":"            self._cmp_sg(exp, ret)"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    @mock.patch.object(api.neutron, \u0027is_extension_supported\u0027)"},{"line_number":1198,"context_line":"    def test_security_group_list(self, mock_is_extension_supported):"}],"source_content_type":"text/x-python","patch_set":6,"id":"61fb098d_4e16d302","line":1195,"updated":"2021-10-18 16:45:19.000000000","message":"All calls of is_extension_supported should be asserted too.","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"bed6889bb9c71184bc436d02fa1d6926c4056e70","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"            rets \u003d api.neutron.security_group_list(self.request, **params)"},{"line_number":1193,"context_line":"        self.assertEqual(len(sgs), len(rets))"},{"line_number":1194,"context_line":"        for (exp, ret) in zip(sgs, rets):"},{"line_number":1195,"context_line":"            self._cmp_sg(exp, ret)"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    @mock.patch.object(api.neutron, \u0027is_extension_supported\u0027)"},{"line_number":1198,"context_line":"    def test_security_group_list(self, mock_is_extension_supported):"}],"source_content_type":"text/x-python","patch_set":6,"id":"008a2ef2_3952af7e","line":1195,"in_reply_to":"61fb098d_4e16d302","updated":"2021-10-18 20:41:34.000000000","message":"Done","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"55bf915014bc279d6db2c99ca5bc804918ab0b4f","unresolved":true,"context_lines":[{"line_number":1194,"context_line":"        for (exp, ret) in zip(sgs, rets):"},{"line_number":1195,"context_line":"            self._cmp_sg(exp, ret)"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    @mock.patch.object(api.neutron, \u0027is_extension_supported\u0027)"},{"line_number":1198,"context_line":"    def test_security_group_list(self, mock_is_extension_supported):"},{"line_number":1199,"context_line":"        # support filtering by the shared field"},{"line_number":1200,"context_line":"        mock_is_extension_supported.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"781260c0_d631b178","line":1197,"range":{"start_line":1197,"start_character":4,"end_line":1197,"end_character":61},"updated":"2021-10-18 16:45:19.000000000","message":"I think this decorator can be moved to _test_security_group_list(). It would be simpler.","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"},{"author":{"_account_id":28159,"name":"Hang Yang","email":"hangyang@yahooinc.com","username":"hangyang"},"change_message_id":"bed6889bb9c71184bc436d02fa1d6926c4056e70","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"        for (exp, ret) in zip(sgs, rets):"},{"line_number":1195,"context_line":"            self._cmp_sg(exp, ret)"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    @mock.patch.object(api.neutron, \u0027is_extension_supported\u0027)"},{"line_number":1198,"context_line":"    def test_security_group_list(self, mock_is_extension_supported):"},{"line_number":1199,"context_line":"        # support filtering by the shared field"},{"line_number":1200,"context_line":"        mock_is_extension_supported.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"c5fba8c0_d5198d08","line":1197,"range":{"start_line":1197,"start_character":4,"end_line":1197,"end_character":61},"in_reply_to":"781260c0_d631b178","updated":"2021-10-18 20:41:34.000000000","message":"Done","commit_id":"3cec9bd7c838553feeec6ed45631f4678d093b79"}]}
