)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"b02eda79_62b6a7db","updated":"2022-02-07 23:52:56.000000000","message":"Thanks for working on this Paul; please take a look at some improvement suggestions inline. \n\nIn your next patch, could you also include a release note? ","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"bcbcf56277af00403ae854cef22da30947b6f903","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"77e4f8ff_c8b2e264","updated":"2022-02-08 17:47:12.000000000","message":"Rebase removed my -1 - comments inline on PS 6","commit_id":"edf98767a685fc40790a08fcb6bc39bcd86553af"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"837c11dc605da6fd8248904225c0025172df0867","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"7558e938_e997707b","updated":"2022-02-10 04:05:02.000000000","message":"Thanks Paul. This LGTM now; if you make another patch, could you please fix the error message we\u0027re faking out in the unit test? ","commit_id":"3c0b34b6c620b9707c5c39129e1e8c5eaf402c9f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e54037ba2e76634531052f214d5d8f4f257e1b68","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"990c43ad_4dd56c63","updated":"2022-02-11 16:52:29.000000000","message":"Not a biggie; but thanks for addressing the comment in the unit tests","commit_id":"bde4b2f3b5e5bb591acefbad8a8c6468d010be2a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"f935988db91e9197089baca3cc1532d7285a6d1d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"a48db4f0_37e2fdaa","updated":"2022-02-14 22:40:49.000000000","message":"LGTM, thanks Paul","commit_id":"36aee019cdeec15d1b0076b30d37e610f80c8513"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"805a9b5db359811905f94a2b457ce990ad224017","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"90925fb3_7cee978f","updated":"2022-02-25 01:08:25.000000000","message":"Thanks for working on this change, Paul\nLGTM","commit_id":"36aee019cdeec15d1b0076b30d37e610f80c8513"}],"manilaclient/tests/unit/v2/test_shell.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":true,"context_lines":[{"line_number":743,"context_line":"    @ddt.unpack"},{"line_number":744,"context_line":"    def test_manage(self, cmd_args, valid_params, is_public\u003dFalse,"},{"line_number":745,"context_line":"                    version\u003dNone):"},{"line_number":746,"context_line":"        if \u0027--wait\u0027 not in cmd_args:"},{"line_number":747,"context_line":"            if version is not None:"},{"line_number":748,"context_line":"                self.run_command(version"},{"line_number":749,"context_line":"                                 + \u0027 manage fake_service fake_protocol \u0027"},{"line_number":750,"context_line":"                                 + \u0027 fake_export_path \u0027"},{"line_number":751,"context_line":"                                 + cmd_args)"},{"line_number":752,"context_line":"            else:"},{"line_number":753,"context_line":"                self.run_command(\u0027 manage fake_service fake_protocol \u0027"},{"line_number":754,"context_line":"                                 + \u0027 fake_export_path \u0027"},{"line_number":755,"context_line":"                                 + cmd_args)"},{"line_number":756,"context_line":"            expected \u003d {"},{"line_number":757,"context_line":"                \u0027share\u0027: {"},{"line_number":758,"context_line":"                    \u0027service_host\u0027: \u0027fake_service\u0027,"},{"line_number":759,"context_line":"                    \u0027protocol\u0027: \u0027fake_protocol\u0027,"},{"line_number":760,"context_line":"                    \u0027export_path\u0027: \u0027fake_export_path\u0027,"},{"line_number":761,"context_line":"                    \u0027name\u0027: None,"},{"line_number":762,"context_line":"                    \u0027description\u0027: None,"},{"line_number":763,"context_line":"                    \u0027is_public\u0027: is_public,"},{"line_number":764,"context_line":"                    \u0027share_server_id\u0027: valid_params[\u0027share_server_id\u0027],"},{"line_number":765,"context_line":"                }"},{"line_number":766,"context_line":"            }"},{"line_number":767,"context_line":"            expected[\u0027share\u0027].update(valid_params)"},{"line_number":768,"context_line":"            self.assert_called(\u0027POST\u0027, \u0027/shares/manage\u0027, body\u003dexpected)"},{"line_number":769,"context_line":""},{"line_number":770,"context_line":"        if \u0027--wait\u0027 in cmd_args:"},{"line_number":771,"context_line":"            share_to_be_managed \u003d shares.Share("},{"line_number":772,"context_line":"                \u0027fake_share\u0027, {"},{"line_number":773,"context_line":"                    \u0027id\u0027: \u0027fake\u0027,"},{"line_number":774,"context_line":"                }"},{"line_number":775,"context_line":"            )"},{"line_number":776,"context_line":"            self.mock_object("},{"line_number":777,"context_line":"                shell_v2, \u0027_wait_for_resource_status\u0027,"},{"line_number":778,"context_line":"                mock.Mock(side_effect\u003d[share_to_be_managed])"},{"line_number":779,"context_line":"            )"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"            if version is not None:"},{"line_number":782,"context_line":"                self.run_command(version"},{"line_number":783,"context_line":"                                 + \u0027 manage fake_service fake_protocol \u0027"},{"line_number":784,"context_line":"                                 + \u0027 fake_export_path \u0027"},{"line_number":785,"context_line":"                                 + cmd_args)"},{"line_number":786,"context_line":"            else:"},{"line_number":787,"context_line":"                self.run_command(\u0027 manage fake_service fake_protocol \u0027"},{"line_number":788,"context_line":"                                 + \u0027 fake_export_path \u0027"},{"line_number":789,"context_line":"                                 + cmd_args)"},{"line_number":790,"context_line":"            expected \u003d {"},{"line_number":791,"context_line":"                \u0027share\u0027: {"},{"line_number":792,"context_line":"                    \u0027service_host\u0027: \u0027fake_service\u0027,"},{"line_number":793,"context_line":"                    \u0027protocol\u0027: \u0027fake_protocol\u0027,"},{"line_number":794,"context_line":"                    \u0027export_path\u0027: \u0027fake_export_path\u0027,"},{"line_number":795,"context_line":"                    \u0027name\u0027: None,"},{"line_number":796,"context_line":"                    \u0027description\u0027: None,"},{"line_number":797,"context_line":"                    \u0027is_public\u0027: is_public,"},{"line_number":798,"context_line":"                    \u0027share_server_id\u0027: valid_params[\u0027share_server_id\u0027],"},{"line_number":799,"context_line":"                }"},{"line_number":800,"context_line":"            }"},{"line_number":801,"context_line":"            expected[\u0027share\u0027].update(valid_params)"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"            self.assert_called(\u0027POST\u0027, \u0027/shares/manage\u0027, body\u003dexpected)"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"            shell_v2._wait_for_resource_status.assert_has_calls(["},{"line_number":806,"context_line":"                mock.call(self.shell.cs, share_to_be_managed,"},{"line_number":807,"context_line":"                          resource_type\u003d\u0027share\u0027,"},{"line_number":808,"context_line":"                          expected_status\u003d\u0027available\u0027)"},{"line_number":809,"context_line":"            ])"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"    def test_manage_invalid_param_share_server_id(self):"},{"line_number":812,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":6,"id":"442da466_a7d29c10","line":809,"range":{"start_line":746,"start_character":0,"end_line":809,"end_character":14},"updated":"2022-02-07 23:52:56.000000000","message":"Isn\u0027t this better to do this:\n\n            self.mock_object(\n                shell_v2, \u0027_wait_for_resource_status\u0027,\n                mock.Mock(return_value\u003dshare_to_be_managed)\n            )\n            if version is not None:\n                self.run_command(version\n                                 + \u0027 manage fake_service fake_protocol \u0027\n                                 + \u0027 fake_export_path \u0027\n                                 + cmd_args)\n            else:\n                self.run_command(\u0027 manage fake_service fake_protocol \u0027\n                                 + \u0027 fake_export_path \u0027\n                                 + cmd_args)\n            expected \u003d {\n                \u0027share\u0027: {\n                    \u0027service_host\u0027: \u0027fake_service\u0027,\n                    \u0027protocol\u0027: \u0027fake_protocol\u0027,\n                    \u0027export_path\u0027: \u0027fake_export_path\u0027,\n                    \u0027name\u0027: None,\n                    \u0027description\u0027: None,\n                    \u0027is_public\u0027: is_public,\n                    \u0027share_server_id\u0027: valid_params[\u0027share_server_id\u0027],\n                }\n            }\n            expected[\u0027share\u0027].update(valid_params)\n            self.assert_called(\u0027POST\u0027, \u0027/shares/manage\u0027, body\u003dexpected)\n\n            if \u0027--wait\u0027 in cmd_args:\n                shell_v2._wait_for_resource_status.assert_called_once_with(. \n                   self.shell.cs, share_to_be_managed, resource_type\u003d\u0027share\u0027,\n                   expected_status\u003d\u0027available\u0027))\n            else:\n                shell_v2._wait_for_resource_status.assert_not_called()","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":true,"context_lines":[{"line_number":948,"context_line":"        expected \u003d {\u0027reset_status\u0027: {\u0027status\u0027: status}}"},{"line_number":949,"context_line":"        self.assert_called(\u0027POST\u0027, \u0027/share-servers/1234/action\u0027, body\u003dexpected)"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    @ddt.data(\u0027--wait\u0027, \u0027\u0027)"},{"line_number":952,"context_line":"    def test_unmanage(self, wait_option):"},{"line_number":953,"context_line":"        self.run_command(\u0027unmanage 1234\u0027)"},{"line_number":954,"context_line":"        self.assert_called(\u0027POST\u0027, \u0027/shares/1234/action\u0027)"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"    def test_share_server_unmanage(self):"},{"line_number":957,"context_line":"        self.run_command(\u0027share-server-unmanage 1234\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"46f16b34_cb8c5b69","line":954,"range":{"start_line":951,"start_character":0,"end_line":954,"end_character":57},"updated":"2022-02-07 23:52:56.000000000","message":"This should work after you fix up the waiter in the shell\u0027s \"do_unmanage\" method:\n\n\n      def test_unmanage(self, wait_option):\n        version \u003d api_versions.APIVersion(\u00272.46\u0027)\n        api \u003d mock.Mock(api_version\u003dversion)\n        manager \u003d shares.ShareManager(api\u003dapi)\n        fake_share \u003d shares.Share(manager,\n                                  {\n                                      \u0027id\u0027: \u0027xyzzyspoon\u0027,\n                                       \u0027api_version\u0027: version,\n                                       \u0027status\u0027: \u0027available\u0027,\n                                  })\n        share_not_found_error \u003d (\"Delete for share %s failed: No share with \"\n                                 \"a name or ID of \u0027%s\u0027 exists.\")\n        share_not_found_error \u003d exceptions.CommandError(\n                share_not_found_error % (fake_share.id,fake_share.id)\n        )\n        self.mock_object(\n            shell_v2, \u0027_find_share\u0027,\n            mock.Mock(side_effect\u003d([fake_share, fake_share, fake_share,\n                                    share_not_found_error])))\n        self.mock_object(\n            shares.ShareManager, \u0027get\u0027,\n            mock.Mock(return_value\u003dfake_share))\n\n        self.run_command(\u0027unmanage %s xyzzyspoon\u0027 % wait_option)\n\n        expected_get_share_calls \u003d 4 if wait_option else 1\n        shell_v2._find_share.assert_has_calls(\n            [mock.call(self.shell.cs, fake_share.id)]* expected_get_share_calls)\n        uri \u003d \u0027/shares/%s/action\u0027 % fake_share.id\n        api.client.post.assert_called_once_with(uri, body\u003d{\u0027unmanage\u0027: None})","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"837c11dc605da6fd8248904225c0025172df0867","unresolved":true,"context_lines":[{"line_number":936,"context_line":"                \u0027status\u0027: \u0027available\u0027,"},{"line_number":937,"context_line":"            }"},{"line_number":938,"context_line":"        )"},{"line_number":939,"context_line":"        share_not_found_error \u003d (\"Delete for share %s failed: No share with \""},{"line_number":940,"context_line":"                                 \"a name or ID of \u0027%s\u0027 exists.\")"},{"line_number":941,"context_line":"        share_not_found_error \u003d exceptions.CommandError("},{"line_number":942,"context_line":"            share_not_found_error % (fake_share.id, fake_share.id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3e0d8a0a_9aa01583","line":939,"range":{"start_line":939,"start_character":34,"end_line":939,"end_character":62},"updated":"2022-02-10 04:05:02.000000000","message":"Sorry, this is a bit confusing - you\u0027ll not see this in the error message, please remove it..","commit_id":"3c0b34b6c620b9707c5c39129e1e8c5eaf402c9f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e54037ba2e76634531052f214d5d8f4f257e1b68","unresolved":true,"context_lines":[{"line_number":936,"context_line":"                \u0027status\u0027: \u0027available\u0027,"},{"line_number":937,"context_line":"            }"},{"line_number":938,"context_line":"        )"},{"line_number":939,"context_line":"        share_not_found_error \u003d (\"Unmanage for share %s failed: No share with \""},{"line_number":940,"context_line":"                                 \"a name or ID of \u0027%s\u0027 exists.\")"},{"line_number":941,"context_line":"        share_not_found_error \u003d exceptions.CommandError("},{"line_number":942,"context_line":"            share_not_found_error % (fake_share.id, fake_share.id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"e771f6cf_44225bae","line":939,"range":{"start_line":939,"start_character":34,"end_line":939,"end_character":64},"updated":"2022-02-11 16:52:29.000000000","message":"Still not the error message. You\u0027ll only get:\n\n\"No \u003cresource\u003e with a name or ID of \u003cxyz\u003e exists\"","commit_id":"bde4b2f3b5e5bb591acefbad8a8c6468d010be2a"}],"manilaclient/v2/shell.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":true,"context_lines":[{"line_number":77,"context_line":"                       \"%(expected_states)s within %(seconds)d seconds.\")"},{"line_number":78,"context_line":"    error_message \u003d (\"%(resource_type)s %(resource)s has reached a failed \""},{"line_number":79,"context_line":"                     \"state.\")"},{"line_number":80,"context_line":"    deleted_message \u003d (\"%(resource_type)s %(resource)s has been successfully \""},{"line_number":81,"context_line":"                       \"deleted.\")"},{"line_number":82,"context_line":"    message_payload \u003d {"},{"line_number":83,"context_line":"        \u0027resource_type\u0027: resource_type.capitalize(),"},{"line_number":84,"context_line":"        \u0027resource\u0027: resource.id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"e9ae99f1_53296244","line":81,"range":{"start_line":80,"start_character":0,"end_line":81,"end_character":34},"updated":"2022-02-07 23:52:56.000000000","message":"add a \"unmanaged_message\" similar to this one..","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":true,"context_lines":[{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            resource \u003d find_resource[resource_type](cs, resource.id)"},{"line_number":96,"context_line":"        except exceptions.CommandError as e:"},{"line_number":97,"context_line":"            if (re.search(not_found_regex, str(e), flags\u003dre.IGNORECASE)"},{"line_number":98,"context_line":"                    and \u0027deleted\u0027 in expected_status):"},{"line_number":99,"context_line":"                print(deleted_message % message_payload)"},{"line_number":100,"context_line":"                break"},{"line_number":101,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5603ff3a_b73090b7","line":98,"range":{"start_line":97,"start_character":12,"end_line":98,"end_character":54},"updated":"2022-02-07 23:52:56.000000000","message":"deleting and unmanaging is kinda similar - manila\u0027s references to the resource are removed... \n\nbut, when unlike \"deleting\" a share, \"unmanaging\" it would mean the data is left behind.. \n\n\"deleted\" and \"unmanaged\" aren\u0027t real statuses in manila; i mean, you\u0027ll not be able to get \"deleted\" or \"unmanaged\" shares.. \n\nso you could rewrite this like this:\n\n if (re.search(not_found_regex, str(e), flags\u003dre.IGNORECASE)):\n    if \u0027deleted\u0027 in expected_status:\n      print(deleted_message % message_payload)\n           break\n    if \u0027unmanaged\u0027 in expected_status:\n      print(deleted_message % message_payload)\n           break","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"d8d696cac8dff857b65a6cb43ce18a7077670eda","unresolved":true,"context_lines":[{"line_number":1692,"context_line":"    metavar\u003d\u0027\u003cshare\u003e\u0027,"},{"line_number":1693,"context_line":"    help\u003d\u0027Name or ID of the share(s).\u0027)"},{"line_number":1694,"context_line":"@cliutils.arg("},{"line_number":1695,"context_line":"    \u0027--wait\u0027,"},{"line_number":1696,"context_line":"    action\u003d\u0027store_true\u0027,"},{"line_number":1697,"context_line":"    help\u003d\u0027Wait for share unmanagement\u0027)"},{"line_number":1698,"context_line":"def do_unmanage(cs, args):"}],"source_content_type":"text/x-python","patch_set":6,"id":"473282ba_784220aa","line":1695,"range":{"start_line":1695,"start_character":4,"end_line":1695,"end_character":13},"updated":"2022-02-07 23:52:56.000000000","message":"This isn\u0027t being used in the code.. \n\nWhat you want is similar to share deletion; when \u0027unmanaging\u0027 a share, the record for the share is removed from manila\u0027s database... so the waiter can be:\n\n\n if args.wait:\n    _wait_for_share_status(cs, share_ref, expected_status\u003d\u0027unmanaged\u0027)","commit_id":"87dad552c0f7a4bb50cb4302b849b6b9989d876f"}]}
