)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0c9183e6a1c435731890fa6f18f521bb15b511cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"06084d0e_378eb391","updated":"2023-04-03 11:51:04.000000000","message":"tiny nit in the docs. Fix that and I\u0027m +2","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"ce5841e00f0bec04f6c33b3f7b4066263c46ea33","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"2ca9bf79_b47a22ff","updated":"2023-04-04 22:52:00.000000000","message":"After coming to an agreement on implementing the resize_share method in the proxy class, I realized I also forgot to write unit tests for the proxy methods I created. The resize_share method is a bit unique compared to other methods in the proxy class in that which method it calls from the Share resource depends on the characteristics of the share that\u0027s being resized. So, in order to reach both branches of execution (new_size is greater than old size and new_size in less than old size), I made a \"mock\" share in the unit test, returning it in the Proxy._get call. \n\nI wasn\u0027t sure what the best way to write a test for this method would be, so if you have any thoughts, I\u0027d appreciate some input if there\u0027s a better way to do the unit test.","commit_id":"6a794908b15a15a1da43ec3b158ef4a80dddf817"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5881d045605989d264c617da175a740bf392ceb2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"c5d5b574_6f45641a","in_reply_to":"05380f07_a3503fb2","updated":"2023-04-14 09:40:54.000000000","message":"Yup, find by me","commit_id":"6a794908b15a15a1da43ec3b158ef4a80dddf817"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"186ab5ace37bf78b467bb2110f4bb2763f44b993","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"05380f07_a3503fb2","in_reply_to":"2ca9bf79_b47a22ff","updated":"2023-04-11 18:39:00.000000000","message":"The test looks good; thanks!","commit_id":"6a794908b15a15a1da43ec3b158ef4a80dddf817"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"42ed76c3c74b04f44c7ad9d46db637a2dd4606c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b76a9f41_2deb490c","updated":"2023-04-11 22:22:18.000000000","message":"Looks great; thank you very much Rey!","commit_id":"c3e77fc61e8082f281ce3f37cef95b30b9180668"}],"doc/source/user/guides/shared_file_system.rst":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0c9183e6a1c435731890fa6f18f521bb15b511cf","unresolved":true,"context_lines":[{"line_number":22,"context_line":"   :pyobject: list_availability_zones"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Resize Share"},{"line_number":25,"context_line":"-----------------------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Shared File System shares can be resized (extended or shrunk) to a given"},{"line_number":28,"context_line":"size. For details on resizing shares, refer to the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"79077388_cfb831d0","line":25,"range":{"start_line":25,"start_character":12,"end_line":25,"end_character":23},"updated":"2023-04-03 11:51:04.000000000","message":"Drop these","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"86de9b5e1b760e9adb6ed598708651394e35cf8e","unresolved":false,"context_lines":[{"line_number":22,"context_line":"   :pyobject: list_availability_zones"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Resize Share"},{"line_number":25,"context_line":"-----------------------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Shared File System shares can be resized (extended or shrunk) to a given"},{"line_number":28,"context_line":"size. For details on resizing shares, refer to the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fce146b6_1204b999","line":25,"range":{"start_line":25,"start_character":12,"end_line":25,"end_character":23},"in_reply_to":"79077388_cfb831d0","updated":"2023-04-04 01:24:22.000000000","message":"Ack","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b365adcf6a7ed42fe45324364e4bb70045bf6d05","unresolved":true,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Shared File System shares can be resized (extended or shrunk) to a given"},{"line_number":28,"context_line":"size. For details on resizing shares, refer to the"},{"line_number":29,"context_line":"`Manila docs \u003chttps://docs.openstack.org/manila/latest/admin/shared-file-systems-share-resize.html\u003e`_."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":".. literalinclude:: ../examples/shared_file_system/shares.py"},{"line_number":32,"context_line":"   :pyobject: shrink_share"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5e180382_ad2fe2d6","line":29,"range":{"start_line":29,"start_character":14,"end_line":29,"end_character":98},"updated":"2023-04-03 20:51:27.000000000","message":"https://docs.openstack.org/manila/latest/user/create-and-manage-shares.html\n\nthis is a better link since it references user-visible actions","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"57e08fd2f0fcca9bc28f54c325c2e813e5b0758c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Shared File System shares can be resized (extended or shrunk) to a given"},{"line_number":28,"context_line":"size. For details on resizing shares, refer to the"},{"line_number":29,"context_line":"`Manila docs \u003chttps://docs.openstack.org/manila/latest/admin/shared-file-systems-share-resize.html\u003e`_."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":".. literalinclude:: ../examples/shared_file_system/shares.py"},{"line_number":32,"context_line":"   :pyobject: shrink_share"}],"source_content_type":"text/x-rst","patch_set":1,"id":"4c31260c_6680af74","line":29,"range":{"start_line":29,"start_character":14,"end_line":29,"end_character":98},"in_reply_to":"270e2528_0f66d1e1","updated":"2023-04-04 03:07:34.000000000","message":"Done","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"86de9b5e1b760e9adb6ed598708651394e35cf8e","unresolved":true,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Shared File System shares can be resized (extended or shrunk) to a given"},{"line_number":28,"context_line":"size. For details on resizing shares, refer to the"},{"line_number":29,"context_line":"`Manila docs \u003chttps://docs.openstack.org/manila/latest/admin/shared-file-systems-share-resize.html\u003e`_."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":".. literalinclude:: ../examples/shared_file_system/shares.py"},{"line_number":32,"context_line":"   :pyobject: shrink_share"}],"source_content_type":"text/x-rst","patch_set":1,"id":"270e2528_0f66d1e1","line":29,"range":{"start_line":29,"start_character":14,"end_line":29,"end_character":98},"in_reply_to":"5e180382_ad2fe2d6","updated":"2023-04-04 01:24:22.000000000","message":"I\u0027ll link the extend/shrink section of that link you provided. Thanks.","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"}],"openstack/shared_file_system/v2/share.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0c9183e6a1c435731890fa6f18f521bb15b511cf","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            extra_attrs[\u0027microversion\u0027] \u003d \\"},{"line_number":116,"context_line":"                self._get_microversion(session, action\u003daction)"},{"line_number":117,"context_line":"        response \u003d session.post(url, json\u003dbody, headers\u003dheaders, **extra_attrs)"},{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e1d8f777_6fc75d99","line":117,"updated":"2023-04-03 11:51:04.000000000","message":"nit: This feels overly complicated. Why not\n\n  if not microversion:\n      microversion \u003d self._get_microversion(session, action\u003daction)\n      \n   response \u003d session.post(\n       url,\n       json\u003dbody,\n       headers\u003dheaders,\n       microversion\u003dmicroversion,\n    )","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"57e08fd2f0fcca9bc28f54c325c2e813e5b0758c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            extra_attrs[\u0027microversion\u0027] \u003d \\"},{"line_number":116,"context_line":"                self._get_microversion(session, action\u003daction)"},{"line_number":117,"context_line":"        response \u003d session.post(url, json\u003dbody, headers\u003dheaders, **extra_attrs)"},{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"d896eefc_989522a8","line":117,"in_reply_to":"554fa1e6_fbb949c9","updated":"2023-04-04 03:07:34.000000000","message":"Done","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"86de9b5e1b760e9adb6ed598708651394e35cf8e","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            extra_attrs[\u0027microversion\u0027] \u003d \\"},{"line_number":116,"context_line":"                self._get_microversion(session, action\u003daction)"},{"line_number":117,"context_line":"        response \u003d session.post(url, json\u003dbody, headers\u003dheaders, **extra_attrs)"},{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"554fa1e6_fbb949c9","line":117,"in_reply_to":"e1d8f777_6fc75d99","updated":"2023-04-04 01:24:22.000000000","message":"Thanks, that\u0027s much cleaner here. I\u0027ll add those changes.","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b365adcf6a7ed42fe45324364e4bb70045bf6d05","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"a4f3b6fd_66b2979f","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"updated":"2023-04-03 20:51:27.000000000","message":"Could we think about a \"resize_share\" SDK method instead of the extend/shrink methods here?\n\nwe\u0027d be able to compare new_size and self.size to figure out what action keyword (\"extend\"/\"shrink\") we need to pass in the API call...","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3771557c6dcb14536cd23e3f109fe3e9fdbf22c9","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"41a46142_c9983bcf","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"0b787b26_199b902d","updated":"2023-04-04 19:39:01.000000000","message":"Thanks Rey. We brainstormed this a bit more; As i understand it Rey presents a use case that needs preventing going above or below a size through the resize share implementation. \n\nI think that\u0027s a good approach. So we can retain these granular methods in the resource, but expose a \"resize_share\" implementation in the proxy file that has a capability to prevent shrinking (or extending) if the existing size is greater (or lesser) than the desired size.\n\nSo if you want a share to be atleast 6GB, and if the share is 7GB, resize would be a noop.","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"ce5841e00f0bec04f6c33b3f7b4066263c46ea33","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"2a86d05b_638bb836","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"41a46142_c9983bcf","updated":"2023-04-04 22:52:00.000000000","message":"Done","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"07b3c3ac3bc488ec5f74b93cfb0ccb7ad486f286","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"0b787b26_199b902d","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"82b6a3d9_f7961dbf","updated":"2023-04-04 14:06:30.000000000","message":"No misunderstanding, it just makes more sense to keep the shrink/extend methods. The behavior of the \"extend\" action is to extend the size of the share, so long as the \"new_size\" is greater than the current size of the share. The behavior of my resize_share method is that it calls the action that would get the share to it\u0027s intended size, that being extend or shrink. \n\nIn some cases, I\u0027d imagine that it would be useful to still have the behavior where a share isn\u0027t resized if the new_size is less than the old size. One example scenario would be the case where you want to enforce a \"minimum\" size among your shared file systems, but you have one (or many) specific file system(s) among your fleet that is larger than other servers. There would be no side effects of calling the extend action across the entire fleet, even for servers that are larger than \"new_size.\" \n\nI think from a server-automation and management perspective, the extend/shrink methods are still useful.\n\nI think the users can choose whether the behavior of the individual extend/shrink methods or the resize_share method is desirable. But I don\u0027t think it makes much sense to make that choice for the users and take one potentially desirable \"behavior\" away from them. \n\nAlso, I like that the implementation of resize_share is as simple as if new_size is greater, then extend_share, and if new_size is lesser, then shrink_share. \n\n@Goutham, what do you think?","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"86de9b5e1b760e9adb6ed598708651394e35cf8e","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"e1459fa7_f4519351","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"a4f3b6fd_66b2979f","updated":"2023-04-04 01:24:22.000000000","message":"I actually think that\u0027s a good idea, although I also think that keeping the shrink/extend methods would be useful, too. One scenario I could see being useful is in the case where you want to \"increase\" the size of a share, only, by setting it to a desired size which should be greater than the current size. The benefit of using \"extend\" in such a case is that you wouldn\u0027t have the unintended behavior of shrinking the share to a given size. \n\nI can add the methods and tests for a resize_share method, though.","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"442308b1bf3b44d46652f17dc162bb4d3ab84e85","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"82b6a3d9_f7961dbf","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"cd3acaf1_0bc774dd","updated":"2023-04-04 12:50:37.000000000","message":"I think you might have misunderstood Goutham here. fwict, he was suggesting implementing \u0027resize_share\u0027 *instead of* \u0027extend_share\u0027 and \u0027shrink_share\u0027, not in addition to.","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"},{"author":{"_account_id":35745,"name":"Reynaldo","display_name":"Reynaldo","email":"rey.bontje80@gmail.com","username":"plugd-in"},"change_message_id":"57e08fd2f0fcca9bc28f54c325c2e813e5b0758c","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        exceptions.raise_from_response(response)"},{"line_number":119,"context_line":"        return response"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def extend_share(self, session, new_size, force\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Extend the share size."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param float new_size: The new size of the share"},{"line_number":125,"context_line":"            in GiB."},{"line_number":126,"context_line":"        :param bool force: Whether or not to use force, bypassing"},{"line_number":127,"context_line":"            the scheduler. Requires admin privileges. Defaults to False."},{"line_number":128,"context_line":"        :returns: The result of the action."},{"line_number":129,"context_line":"        :rtype: ``None``"},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        extend_body \u003d {\"new_size\": new_size}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if force is True:"},{"line_number":135,"context_line":"            extend_body[\u0027force\u0027] \u003d True"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        body \u003d {\"extend\": extend_body}"},{"line_number":138,"context_line":"        self._action(session, body)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def shrink_share(self, session, new_size):"},{"line_number":141,"context_line":"        \"\"\"Shrink the share size."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        :param float new_size: The new size of the share"},{"line_number":144,"context_line":"            in GiB."},{"line_number":145,"context_line":"        :returns: ``None``"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        body \u003d {\"shrink\": {\u0027new_size\u0027: new_size}}"},{"line_number":149,"context_line":"        self._action(session, body)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def revert_to_snapshot(self, session, snapshot_id):"},{"line_number":152,"context_line":"        \"\"\"Revert the share to the given snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"cd3acaf1_0bc774dd","line":149,"range":{"start_line":121,"start_character":0,"end_line":149,"end_character":35},"in_reply_to":"e1459fa7_f4519351","updated":"2023-04-04 03:07:34.000000000","message":"Done","commit_id":"b44285c015e984cb76dc29225cd560bf7d4de79b"}]}
