)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Archana Kumari \u003cak31960466@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-05-01 00:45:26 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"a --wait option for deleting a share group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ic2d939d0dde278f3f0eed870df808da1344ae91a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ce5c01a3_1197d4dd","line":7,"updated":"2021-05-04 12:16:41.000000000","message":"Rework commit message to stick with best practices, check out https://wiki.openstack.org/wiki/GitCommitMessages.\n\nPrecisely we are missing a body (with a description of what is being fixed) and the Closes-Bug: bug/\u003cbug number\u003e tag.\n\nKeep the Change-Id.","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"0ad424563795d7b26efdbeedf63313e6248d1c75","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Archana \u003cak31960466@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-06-03 18:25:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"build fix on adding \"--wait\" option for deleting a share group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ic2d939d0dde278f3f0eed870df808da1344ae91a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d1eaa0ce_8d54b1c1","line":7,"updated":"2021-06-04 11:29:36.000000000","message":"Add a title like \"Add --wait flag to the delete share group operation\"\n\nAdd a body for the commit message like \"This patch set adds the --wait flag to the share group operation. This will make the CLI to wait for the operation to be completed before returning to the prompt.\"\n\nAdd the Closes-Bug tag like \"Closes-Bug: #1898318\". The bug number is the number you have in https://bugs.launchpad.net/python-manilaclient/+bug/1898318. This allows us to track bug reports with bug fixes.","commit_id":"c18a209663da56981a40f27a1608d40583200978"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f6647a3122c54dc4bdfcd2d28fa559889566e1b4","unresolved":true,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2021-06-04 21:40:23 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add --wait flag to the delete share group operation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1898318"},{"line_number":10,"context_line":"Change-Id: Ic2d939d0dde278f3f0eed870df808da1344ae91a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"b94542b2_3a6b3681","line":8,"updated":"2021-06-07 11:26:01.000000000","message":"Add the body for the commit message","commit_id":"c01fd770d1fb09fd462270550272d1c9c37d03fd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"628ec8064b5784be4b30337e83f88f5256a9eaf7","unresolved":true,"context_lines":[{"line_number":22,"context_line":"some errors. Created mocks for required resources within those"},{"line_number":23,"context_line":"tests to make it more stable."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Closes-Bug: #1898318"},{"line_number":26,"context_line":"Change-Id: Ic2d939d0dde278f3f0eed870df808da1344ae91a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"f6a1e7ea_a1bd5bf4","line":25,"updated":"2021-07-09 09:37:30.000000000","message":"Partial-Bug instead of Closes-Bug","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"76704a1bcb05b4cb2af4fdec32ccdafce24d0a8c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"some errors. Created mocks for required resources within those"},{"line_number":23,"context_line":"tests to make it more stable."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Closes-Bug: #1898318"},{"line_number":26,"context_line":"Change-Id: Ic2d939d0dde278f3f0eed870df808da1344ae91a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"4917ce54_b3c1aebc","line":25,"in_reply_to":"f6a1e7ea_a1bd5bf4","updated":"2021-07-12 06:27:28.000000000","message":"Done","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"}],"manilaclient/tests/unit/v2/test_shell.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":2745,"context_line":"            exceptions.CommandError,"},{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @mock.patch.object(\u0027share_group_xyz\u0027, \u0027share_group_abc\u0027, \u0027share_group_xyz\u0027)"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake \u003d mock.Mock()"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"fe1eddff_2e7ad8f8","line":2748,"updated":"2021-05-04 12:16:41.000000000","message":"No need to change this, we need to mock the _find_share_group method in the shell_v2 lib","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @mock.patch.object(\u0027share_group_xyz\u0027, \u0027share_group_abc\u0027, \u0027share_group_xyz\u0027)"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake \u003d mock.Mock()"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["},{"line_number":2752,"context_line":"            share_group.ShareGroup(fake, {\u0027id\u0027: \u00271234\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"2dac80e3_6473e2f4","line":2749,"updated":"2021-05-04 12:16:41.000000000","message":"Probably what you are trying to do is to add ddt so we can have three test cases with the different share_group_to_delete value. In that case, you need to add the @ddt decorator. Still, I don\u0027t see the point of doing that here, unless you are testing border cases.","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"5a1d91f6fcaec1911056ca55309e34a70bb92f86","unresolved":true,"context_lines":[{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @mock.patch.object(\u0027share_group_xyz\u0027, \u0027share_group_abc\u0027, \u0027share_group_xyz\u0027)"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake \u003d mock.Mock()"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["},{"line_number":2752,"context_line":"            share_group.ShareGroup(fake, {\u0027id\u0027: \u00271234\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"81d016af_5a17b72d","line":2749,"in_reply_to":"2dac80e3_6473e2f4","updated":"2021-06-02 19:30:43.000000000","message":"I didn\u0027t get your point here. Can you please explain me a little more?\nor is this follow the same implementation just like in L949","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"19d6f8abe5bf2b4582b86888a7b51b431d8c4ea3","unresolved":true,"context_lines":[{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @mock.patch.object(\u0027share_group_xyz\u0027, \u0027share_group_abc\u0027, \u0027share_group_xyz\u0027)"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake \u003d mock.Mock()"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["},{"line_number":2752,"context_line":"            share_group.ShareGroup(fake, {\u0027id\u0027: \u00271234\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"f1fefeec_30064e73","line":2749,"in_reply_to":"81d016af_5a17b72d","updated":"2021-06-03 08:55:13.000000000","message":"This decorator is @mock.patch.object(). With this, you are mocking shell_v2 and _find_share_group from the original class. I understand that you are trying to pass share_group_to_delete as a param and instantiate with ddt. In that case, @ddt decorator is the one you need.","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":2760,"context_line":"                                    % (share_group, share_group))"},{"line_number":2761,"context_line":"            for share_group in share_group_to_delete"},{"line_number":2762,"context_line":"        ]"},{"line_number":2763,"context_line":"        self.mock_object("},{"line_number":2764,"context_line":"            shell_v2, \u0027_find_share_group\u0027, mock.Mock("},{"line_number":2765,"context_line":"                side_effect\u003d(fake_share_group +"},{"line_number":2766,"context_line":"                             share_group_are_not_found_errors)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"4471d3b1_950c631a","line":2763,"updated":"2021-05-04 12:16:41.000000000","message":"No need to mock this object here if we mock it on L2748","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":2768,"context_line":"        self.run_command(\u0027share-group-delete %s --wait\u0027 % \u0027 \u0027"},{"line_number":2769,"context_line":"                         .join(share_group_to_delete))"},{"line_number":2770,"context_line":""},{"line_number":2771,"context_line":"        # self.assert_called(\u0027DELETE\u0027, \u0027/share-groups/1234\u0027)"},{"line_number":2772,"context_line":""},{"line_number":2773,"context_line":"        shell_v2._find_share_group.assert_has_calls(["},{"line_number":2774,"context_line":"            mock.call(self.shell.cs, share_group)"}],"source_content_type":"text/x-python","patch_set":1,"id":"34c319f7_2e22b3d4","line":2771,"updated":"2021-05-04 12:16:41.000000000","message":"We need this assert","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"0ad424563795d7b26efdbeedf63313e6248d1c75","unresolved":true,"context_lines":[{"line_number":2745,"context_line":"            exceptions.CommandError,"},{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @ddt.data((\u0027share_group_xyz\u0027, ), (\u0027share_group_abc\u0027, \u0027share_group_xyz\u0027))"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake \u003d mock.Mock()"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"2b5a04e5_e2fc1f76","line":2748,"updated":"2021-06-04 11:29:36.000000000","message":"Change this line for \"@mock.patch.object(shell_v2, \u0027_find_share_group\u0027, mock.Mock())\"\n\nAdd, just above or below, the line \"@ddt.data((\u0027share_group_xyz\u0027, ), (\u0027share_group_abc\u0027, \u0027share_group_xyz\u0027))\"","commit_id":"c18a209663da56981a40f27a1608d40583200978"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f6647a3122c54dc4bdfcd2d28fa559889566e1b4","unresolved":true,"context_lines":[{"line_number":2744,"context_line":"        self.assertRaises("},{"line_number":2745,"context_line":"            exceptions.CommandError,"},{"line_number":2746,"context_line":"            self.run_command, \u0027share-group-update 1234\u0027)"},{"line_number":2747,"context_line":""},{"line_number":2748,"context_line":"    @mock.patch.object(shell_v2, \u0027_find_share_group\u0027, mock.Mock())"},{"line_number":2749,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2750,"context_line":"        fake_manager \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"acc035bd_b042045d","line":2747,"updated":"2021-06-07 11:26:01.000000000","message":"Add the @ddt decorator here, with the values for share_group_to_delete, as you did in your previous patch set. You will have one decorator on top of the other (@ddt in one line, @mock.patch.object in the second line)\n\nIf you inspect the logs for py3X gate, you will see this output:\n\n\"TypeError: test_share_group_delete_wait() missing 1 required positional argument: \u0027share_group_to_delete\u0027\"","commit_id":"c01fd770d1fb09fd462270550272d1c9c37d03fd"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":41,"context_line":"from manilaclient.v2 import share_servers"},{"line_number":42,"context_line":"from manilaclient.v2 import share_snapshots"},{"line_number":43,"context_line":"from manilaclient.v2 import share_types"},{"line_number":44,"context_line":"from manilaclient.v2 import share_groups"},{"line_number":45,"context_line":"from manilaclient.v2 import shares"},{"line_number":46,"context_line":"from manilaclient.v2 import shell as shell_v2"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1928f0d7_02e674c3","line":44,"in_reply_to":"340142f8_bf0e3d70","updated":"2021-06-09 12:16:36.000000000","message":"\u003e pep8: H306: imports not in alphabetical order (manilaclient.v2.share_types, manilaclient.v2.share_groups)\n\nPut this line after L38. Imports should be in alphabetical order.","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":2749,"context_line":"    @ddt.data((\u0027share_group_xyz\u0027, ), (\u0027share_group_abc\u0027, \u0027share_group_xyz\u0027))"},{"line_number":2750,"context_line":"    def test_share_group_delete_wait(self, share_group_to_delete):"},{"line_number":2751,"context_line":"        fake_share_group \u003d ["},{"line_number":2752,"context_line":"            share_groups.ShareGroup(\u0027fake\u0027, {\u0027id\u0027: share_group})"},{"line_number":2753,"context_line":"            for share_group in share_group_to_delete"},{"line_number":2754,"context_line":"        ]"},{"line_number":2755,"context_line":"        share_group_not_found_error \u003d (\"Delete for share group %s \""}],"source_content_type":"text/x-python","patch_set":5,"id":"3432ce91_94c770ff","line":2752,"updated":"2021-06-09 12:16:36.000000000","message":"This can\u0027t be a string, it has to be a callable. \nThis is because this resolves to the Share Group resource\u0027s \"manager\" attribute/object [1], and the delete call is actually being resolved with this manager [2]\n\nYou can create a fake manager and use it as follows:\n\n  fake_manager \u003d mock.Mock()\n  fake_share_group \u003d [\n            share_groups.ShareGroup(fake_manager, {\u0027id\u0027: share_group})\n            for share_group in share_groups_to_delete\n  ]\n \n[1] https://github.com/openstack/python-manilaclient/blob/80ec2919ca6dafe458c2db2e455f937e2f67cfe2/manilaclient/common/apiclient/base.py#L435\n[2] https://github.com/openstack/python-manilaclient/blob/a68aaab1723b209de8d314abc7192d373074825a/manilaclient/v2/share_groups.py#L41-L43","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":2771,"context_line":"            mock.call(self.shell.cs, share_group) for share_group in"},{"line_number":2772,"context_line":"            share_group_to_delete"},{"line_number":2773,"context_line":"        ])"},{"line_number":2774,"context_line":"        for share_group in fake_share_group:"},{"line_number":2775,"context_line":"            uri \u003d \u0027/share_groups/%s\u0027 % share_group.id"},{"line_number":2776,"context_line":"            self.assert_called_anytime(\u0027DELETE\u0027, uri, clear_callstack\u003dFalse)"},{"line_number":2777,"context_line":"        # fake_manager.delete.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":5,"id":"0a6fa34b_a5d220d1","line":2774,"updated":"2021-06-09 12:16:36.000000000","message":"Since we\u0027re mocking out the client manager, we can\u0027t assert the exact API call\n\nThe lines you commented out L2775 to L2780 should be used instead. With that, we can check the mocked manager was invoked correctly.\n\nSo, remove L2774 to L2776, and comment out L2777 to L2780","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":2775,"context_line":"            uri \u003d \u0027/share_groups/%s\u0027 % share_group.id"},{"line_number":2776,"context_line":"            self.assert_called_anytime(\u0027DELETE\u0027, uri, clear_callstack\u003dFalse)"},{"line_number":2777,"context_line":"        # fake_manager.delete.assert_has_calls(["},{"line_number":2778,"context_line":"        #     mock.call(share_group) for share_group in fake_share_group])"},{"line_number":2779,"context_line":"        # self.assertEqual(len(share_group_to_delete),"},{"line_number":2780,"context_line":"        #                  fake_manager.delete.call_count)"},{"line_number":2781,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5698f2bd_bb321210","line":2778,"updated":"2021-06-09 12:16:36.000000000","message":"We are calling with the flag force\u003dFalse, so you would need to change this to read like\n\n fake_manager.delete.assert_has_calls([\n            mock.call(share_group,\n                      force\u003dFalse) for share_group in fake_share_group])","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":2780,"context_line":"        #                  fake_manager.delete.call_count)"},{"line_number":2781,"context_line":""},{"line_number":2782,"context_line":"    @mock.patch.object(shell_v2, \u0027_find_share_group\u0027, mock.Mock())"},{"line_number":2783,"context_line":"    def test_share_group_delete_force(self):"},{"line_number":2784,"context_line":"        fake_group \u003d type(\u0027FakeShareGroup\u0027, (object,), {\u0027id\u0027: \u00271234\u0027})"},{"line_number":2785,"context_line":"        shell_v2._find_share_group.return_value \u003d fake_group"},{"line_number":2786,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"b1744b0e_eb2d6dbe","line":2783,"updated":"2021-06-09 12:16:36.000000000","message":"This test needs to fixed too, since it\u0027s using the same call.\n\nFollowing the same style for the last test, we can do something like this\n\n    def test_share_group_delete_force(self):\n        fake_manager \u003d mock.Mock()\n        fake_share_group \u003d share_groups.ShareGroup(\n            fake_manager, {\u0027id\u0027: \u0027fake-group\u0027})\n\n        self.mock_object(\n            shell_v2, \u0027_find_share_group\u0027,\n            mock.Mock(side_effect\u003d[fake_share_group]))\n        self.run_command(\u0027share-group-delete --force fake-group\u0027)\n        shell_v2._find_share_group.assert_has_calls(\n            [mock.call(self.shell.cs, \"fake-group\")])\n        fake_manager.delete.assert_has_calls(\n            [mock.call(fake_share_group, force\u003dTrue)])\n        self.assertEqual(1, fake_manager.delete.call_count)","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"}],"manilaclient/v2/shell.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":5484,"context_line":"    default\u003dFalse,"},{"line_number":5485,"context_line":"    help\u003d\u0027Attempt to force delete the share group (Default\u003dFalse)\u0027"},{"line_number":5486,"context_line":"         \u0027 (Admin only).\u0027)"},{"line_number":5487,"context_line":"@cliutils.arg("},{"line_number":5488,"context_line":"    \u0027--wait\u0027,"},{"line_number":5489,"context_line":"    action\u003d\u0027store_true\u0027,"},{"line_number":5490,"context_line":"    help\u003d\u0027Wait for share group to delete\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e845dcaf_8be2439c","line":5487,"updated":"2021-05-04 12:16:41.000000000","message":"Remove duplicate, we only need to add the parameter one time","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d281d1cfb93515240bd4efe8abcdf6f2a5ae7acc","unresolved":true,"context_lines":[{"line_number":5524,"context_line":"                    expected_status\u003d\u0027deleted\u0027)"},{"line_number":5525,"context_line":"            except exceptions.CommandError as e:"},{"line_number":5526,"context_line":"                print(e, file\u003dsys.stderr)"},{"line_number":5527,"context_line":""},{"line_number":5528,"context_line":"@cliutils.arg("},{"line_number":5529,"context_line":"    \u0027share_group\u0027,"},{"line_number":5530,"context_line":"    metavar\u003d\u0027\u003cshare_group\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fe61e2d1_5a594ed8","line":5527,"updated":"2021-05-04 12:16:41.000000000","message":"Add one more empty line here","commit_id":"170129a03b6cfc3ed7378178c1688f7ebad336a8"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":5493,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5494,"context_line":"    failure_count \u003d 0"},{"line_number":5495,"context_line":"    kwargs \u003d {}"},{"line_number":5496,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5497,"context_line":""},{"line_number":5498,"context_line":"    if args.force is not None:"},{"line_number":5499,"context_line":"        kwargs[\u0027force\u0027] \u003d args.force"}],"source_content_type":"text/x-python","patch_set":5,"id":"cf68c140_9c3f6993","line":5496,"updated":"2021-06-09 12:16:36.000000000","message":"Add the line \"force \u003d args.force or False\"\n\nI don\u0027t see a point of having an if-clause if we can solve it with a one liner.","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":5495,"context_line":"    kwargs \u003d {}"},{"line_number":5496,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5497,"context_line":""},{"line_number":5498,"context_line":"    if args.force is not None:"},{"line_number":5499,"context_line":"        kwargs[\u0027force\u0027] \u003d args.force"},{"line_number":5500,"context_line":""},{"line_number":5501,"context_line":"    for share_group in args.share_group:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7d6c81cc_b15fa750","line":5498,"updated":"2021-06-09 12:16:36.000000000","message":"Remove this if clause (both L5498 and L5499)","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"2b62c5b7f20c69fdc54ba44e74ed07fffc8dc4fe","unresolved":true,"context_lines":[{"line_number":5502,"context_line":"        try:"},{"line_number":5503,"context_line":"            share_group_ref \u003d _find_share_group(cs, share_group)"},{"line_number":5504,"context_line":"            share_group_to_delete.append(share_group_ref)"},{"line_number":5505,"context_line":"            share_group_ref.delete()"},{"line_number":5506,"context_line":"        except Exception as e:"},{"line_number":5507,"context_line":"            failure_count +\u003d 1"},{"line_number":5508,"context_line":"            print(\"Delete for share group %s failed: %s\" % ("}],"source_content_type":"text/x-python","patch_set":5,"id":"de9c250a_5f14ec2e","line":5505,"updated":"2021-06-09 12:16:36.000000000","message":"Pass the param \"force\" to the delete operation. Should be something like \"share_group_ref.delete(force)\"","commit_id":"aaeafe6f77c4e374d445f7a283a03197bb197d42"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f6142afe79dcbb2c0617dd2d271b18257a783c9a","unresolved":true,"context_lines":[{"line_number":5517,"context_line":"@cliutils.arg("},{"line_number":5518,"context_line":"    \u0027--wait\u0027,"},{"line_number":5519,"context_line":"    action\u003d\u0027store_true\u0027,"},{"line_number":5520,"context_line":"    help\u003d\u0027Wait for share group to delete\u0027)"},{"line_number":5521,"context_line":"@cliutils.service_type(\u0027sharev2\u0027)"},{"line_number":5522,"context_line":"def do_share_group_delete(cs, args):"},{"line_number":5523,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"d7318a61_ac60fe74","line":5520,"updated":"2021-07-09 08:51:16.000000000","message":"default\u003d\u0027False\u0027","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"76704a1bcb05b4cb2af4fdec32ccdafce24d0a8c","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"@cliutils.arg("},{"line_number":5518,"context_line":"    \u0027--wait\u0027,"},{"line_number":5519,"context_line":"    action\u003d\u0027store_true\u0027,"},{"line_number":5520,"context_line":"    help\u003d\u0027Wait for share group to delete\u0027)"},{"line_number":5521,"context_line":"@cliutils.service_type(\u0027sharev2\u0027)"},{"line_number":5522,"context_line":"def do_share_group_delete(cs, args):"},{"line_number":5523,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"68d4427f_4d35be26","line":5520,"in_reply_to":"d7318a61_ac60fe74","updated":"2021-07-12 06:27:28.000000000","message":"Done","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":31213,"name":"Maari Tamm","email":"maari.tamm@citynetwork.eu","username":"maaritamm"},"change_message_id":"298d731fd774c6230495d8858d2700409947d5f0","unresolved":true,"context_lines":[{"line_number":5523,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5524,"context_line":"    failure_count \u003d 0"},{"line_number":5525,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5526,"context_line":"    force \u003d args.force or False"},{"line_number":5527,"context_line":""},{"line_number":5528,"context_line":"    for share_group in args.share_group:"},{"line_number":5529,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fe050b4d_29ed0c14","line":5526,"range":{"start_line":5526,"start_character":4,"end_line":5526,"end_character":9},"updated":"2021-07-06 09:08:44.000000000","message":"Is this definition necessary? I believe `args.force` already has a default value of `False` when the flag is not used.","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"76704a1bcb05b4cb2af4fdec32ccdafce24d0a8c","unresolved":false,"context_lines":[{"line_number":5523,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5524,"context_line":"    failure_count \u003d 0"},{"line_number":5525,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5526,"context_line":"    force \u003d args.force or False"},{"line_number":5527,"context_line":""},{"line_number":5528,"context_line":"    for share_group in args.share_group:"},{"line_number":5529,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"70ae707d_eecea0fc","line":5526,"range":{"start_line":5526,"start_character":4,"end_line":5526,"end_character":9},"in_reply_to":"434341fa_7bcd8c52","updated":"2021-07-12 06:27:28.000000000","message":"Done","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"f6142afe79dcbb2c0617dd2d271b18257a783c9a","unresolved":true,"context_lines":[{"line_number":5523,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5524,"context_line":"    failure_count \u003d 0"},{"line_number":5525,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5526,"context_line":"    force \u003d args.force or False"},{"line_number":5527,"context_line":""},{"line_number":5528,"context_line":"    for share_group in args.share_group:"},{"line_number":5529,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"434341fa_7bcd8c52","line":5526,"range":{"start_line":5526,"start_character":4,"end_line":5526,"end_character":9},"in_reply_to":"fe050b4d_29ed0c14","updated":"2021-07-09 08:51:16.000000000","message":"Good catch, we can directly set the default value to False and when the flag is used set it to True.\n\n@Archu you would need to set the default value as marked in L5520","commit_id":"9a8106c561fa14dc104c7a39dfe97ca83d1b5fe4"},{"author":{"_account_id":31213,"name":"Maari Tamm","email":"maari.tamm@citynetwork.eu","username":"maaritamm"},"change_message_id":"65382abb20f4c9b490b9c6b681c1bc50ba8adf3a","unresolved":true,"context_lines":[{"line_number":5524,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5525,"context_line":"    failure_count \u003d 0"},{"line_number":5526,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5527,"context_line":"    force \u003d args.force"},{"line_number":5528,"context_line":""},{"line_number":5529,"context_line":"    for share_group in args.share_group:"},{"line_number":5530,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"88d411ee_c9077a1b","line":5527,"range":{"start_line":5527,"start_character":4,"end_line":5527,"end_character":22},"updated":"2021-07-14 09:33:50.000000000","message":"So I was thinking we don\u0027t need this line at all.","commit_id":"173e036fd547b40e6e13538776008f63608cfd53"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"e764b49d470c8a4b6f874eccc35f1b94820ebb97","unresolved":false,"context_lines":[{"line_number":5524,"context_line":"    \"\"\"Delete one or more share groups.\"\"\""},{"line_number":5525,"context_line":"    failure_count \u003d 0"},{"line_number":5526,"context_line":"    share_group_to_delete \u003d []"},{"line_number":5527,"context_line":"    force \u003d args.force"},{"line_number":5528,"context_line":""},{"line_number":5529,"context_line":"    for share_group in args.share_group:"},{"line_number":5530,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"dc651799_3b974b20","line":5527,"range":{"start_line":5527,"start_character":4,"end_line":5527,"end_character":22},"in_reply_to":"88d411ee_c9077a1b","updated":"2021-07-14 09:41:54.000000000","message":"Done","commit_id":"173e036fd547b40e6e13538776008f63608cfd53"},{"author":{"_account_id":31213,"name":"Maari Tamm","email":"maari.tamm@citynetwork.eu","username":"maaritamm"},"change_message_id":"65382abb20f4c9b490b9c6b681c1bc50ba8adf3a","unresolved":true,"context_lines":[{"line_number":5530,"context_line":"        try:"},{"line_number":5531,"context_line":"            share_group_ref \u003d _find_share_group(cs, share_group)"},{"line_number":5532,"context_line":"            share_group_to_delete.append(share_group_ref)"},{"line_number":5533,"context_line":"            share_group_ref.delete(force)"},{"line_number":5534,"context_line":"        except Exception as e:"},{"line_number":5535,"context_line":"            failure_count +\u003d 1"},{"line_number":5536,"context_line":"            print(\"Delete for share group %s failed: %s\" % ("}],"source_content_type":"text/x-python","patch_set":12,"id":"286bbb1e_78b9c391","line":5533,"range":{"start_line":5533,"start_character":35,"end_line":5533,"end_character":40},"updated":"2021-07-14 09:33:50.000000000","message":"can we just pass `args.force` here?","commit_id":"173e036fd547b40e6e13538776008f63608cfd53"},{"author":{"_account_id":33380,"name":"Archana Kumari","display_name":"Archana Kumari","email":"ak31960466@gmail.com","username":"archanaserver"},"change_message_id":"e764b49d470c8a4b6f874eccc35f1b94820ebb97","unresolved":false,"context_lines":[{"line_number":5530,"context_line":"        try:"},{"line_number":5531,"context_line":"            share_group_ref \u003d _find_share_group(cs, share_group)"},{"line_number":5532,"context_line":"            share_group_to_delete.append(share_group_ref)"},{"line_number":5533,"context_line":"            share_group_ref.delete(force)"},{"line_number":5534,"context_line":"        except Exception as e:"},{"line_number":5535,"context_line":"            failure_count +\u003d 1"},{"line_number":5536,"context_line":"            print(\"Delete for share group %s failed: %s\" % ("}],"source_content_type":"text/x-python","patch_set":12,"id":"4d39bf8c_20853bf6","line":5533,"range":{"start_line":5533,"start_character":35,"end_line":5533,"end_character":40},"in_reply_to":"286bbb1e_78b9c391","updated":"2021-07-14 09:41:54.000000000","message":"Done","commit_id":"173e036fd547b40e6e13538776008f63608cfd53"}]}
