)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"799216fef10abedec66f7ba52fc689b208f38659","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Response will be `async`, `sync`. `sync` or `trisync`."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"`trisync` implies support for `sync` and `async`."},{"line_number":18,"context_line":"`sync` implies support for `async`."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I46cbb986ed73335270d6dd4ad197197648b55506"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"445cd0c1_21c87c4b","line":18,"updated":"2023-02-17 15:04:15.000000000","message":"okay","commit_id":"a87eb136488742e8736b2d12ed1eea1bdd20882c"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a86aff33ff0a10b8c6c837418dcadb9fd98407de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cf1e1fa3_6b318e9a","updated":"2023-02-14 17:10:13.000000000","message":"Code looks ok to me but I don\u0027t see a passing Pure Storage CI.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6a053f795166c87172802ec207926d8f42062e74","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a743c32f_537c2c50","updated":"2023-02-15 02:50:21.000000000","message":"Hi Simon, just a few small comments I would like you to take a look.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":35002},"change_message_id":"81d88010b9dd1a212e264015f19c9f025dcc4cc0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"151c18fb_4c7d402a","updated":"2023-02-14 15:32:53.000000000","message":"LGTM","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"9187c2be107153b48ae669955f108cde80121d96","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"25b3138f_d9c4061e","updated":"2023-02-15 02:23:29.000000000","message":"Looks like our FC switches are broke again, so the FC tests will fail until we get this resolved properly.\nThis feature does not rely on the dataplane and so passing the iSCSI and NVMe-RoCE CI show the code is good.\nWe have proved the patch does what it is supposed to with an FC dataplane in-house.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"546caff4464282f57a4b2e581eaffbfb068bc0ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f78931f9_1337f1ac","updated":"2023-02-15 17:37:24.000000000","message":"Updated the code to be more intelligent and the associated docs and commit message","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"0b59c4ff846e10ae6e81a4d2f47d24bc9bfbafcc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9ba374d2_412e4212","updated":"2023-01-25 21:42:58.000000000","message":"recheck","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"86ba49e09b017a6ba2cb98f96d5dd31cd5bc7b91","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"221ee7c3_449d770c","updated":"2023-02-14 17:21:02.000000000","message":"run Pure Storage CI","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"6512de902ebfce2f51b3fabea0bcc2cc792aa7ac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4d4beed8_fe94170a","updated":"2023-02-14 21:51:49.000000000","message":"run Pure Storage CI","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"d60d25f582cd888eee7beabb8ca05083fb1be6f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"917d1844_f1c1ae57","updated":"2023-02-14 22:04:07.000000000","message":"run Pure Storage CI","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"4d5647e2e2b7f4f6bf18097a9e9fb7b4ea3d9b9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"be4002e0_e5a9e6de","updated":"2023-02-14 22:52:57.000000000","message":"run Pure Storage CI","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"b10a0217d6c3ac675d4fd8b16330c34aabff541e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d910604c_e78153d8","updated":"2023-02-14 19:44:07.000000000","message":"run Pure Storage CI","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":12988,"name":"Peter Penchev","email":"openstack-dev@storpool.com","username":"ppenchev"},"change_message_id":"e05a591136592de5b3b2ed183ac055fb8429fa06","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"77375157_c77e60d4","updated":"2023-01-26 12:21:52.000000000","message":"run-storpoolci","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"bfbf8cabc181399971e60a8c45926b8ff0d3c8ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"05dc5bb7_9d94ebbe","updated":"2023-02-16 19:49:35.000000000","message":"one improvement noted inline","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"7691384977cc2a39a2c838ebbcea2af148dbf2f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"2fff38b0_f06284dc","updated":"2023-02-16 04:01:09.000000000","message":"recheck","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"85c0190cd6f995f78fbf57f9d0071b0d23c16713","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"bdc3229e_964ed89f","updated":"2023-02-15 23:14:33.000000000","message":"recheck","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"03efff12164e2cf926726e3e5e862946d14393d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5b4df758_db108e42","updated":"2023-02-15 20:57:47.000000000","message":"recheck cinder-plugin-ceph-tempest","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"dbacefb40ca3453e90b4eba01c24f8f32f3d9d21","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"516ae785_3f0f25d6","updated":"2023-02-16 18:06:30.000000000","message":"run Pure Storage CI","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"799216fef10abedec66f7ba52fc689b208f38659","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"074949f8_3abec594","updated":"2023-02-17 15:04:15.000000000","message":" Pure CI jobs are passing. LGTM.","commit_id":"a87eb136488742e8736b2d12ed1eea1bdd20882c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f36cffc8ecd41398717fe8eeb1720b30a2203550","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fc2423fb_9053d101","updated":"2023-02-17 13:57:40.000000000","message":"my comments are addressed, Pure CI jobs are passing. LGTM.","commit_id":"a87eb136488742e8736b2d12ed1eea1bdd20882c"}],"cinder/volume/drivers/pure.py":[{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6a053f795166c87172802ec207926d8f42062e74","unresolved":true,"context_lines":[{"line_number":931,"context_line":"                                       in self._replication_target_arrays]"},{"line_number":932,"context_line":"        self._stats \u003d data"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _get_replication_capability(self):"},{"line_number":935,"context_line":"        \"\"\"Discovered connected arrays status for replication\"\"\""},{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"}],"source_content_type":"text/x-python","patch_set":2,"id":"39472537_ba439a9e","line":934,"updated":"2023-02-15 02:50:21.000000000","message":"As function _get_replication_capability is new doesn\u0027t it deserves its own unit tests? I understand the function is quite trivial but you only mocks its returns and it\u0027s not being tested at all, which is bad for code\u0027s coverage. :(","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6a053f795166c87172802ec207926d8f42062e74","unresolved":true,"context_lines":[{"line_number":931,"context_line":"                                       in self._replication_target_arrays]"},{"line_number":932,"context_line":"        self._stats \u003d data"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _get_replication_capability(self):"},{"line_number":935,"context_line":"        \"\"\"Discovered connected arrays status for replication\"\"\""},{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"}],"source_content_type":"text/x-python","patch_set":2,"id":"a29393ab_21f9f73c","line":934,"updated":"2023-02-15 02:50:21.000000000","message":"Doesn\u0027t _get_replication_capability deserves its own unit tests? you are checking a few","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"546caff4464282f57a4b2e581eaffbfb068bc0ed","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                                       in self._replication_target_arrays]"},{"line_number":932,"context_line":"        self._stats \u003d data"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _get_replication_capability(self):"},{"line_number":935,"context_line":"        \"\"\"Discovered connected arrays status for replication\"\"\""},{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"}],"source_content_type":"text/x-python","patch_set":2,"id":"16f667f8_9baef3fc","line":934,"in_reply_to":"39472537_ba439a9e","updated":"2023-02-15 17:37:24.000000000","message":"Done","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"d3c3e3446f5c9fb7b4f8764189bdb38fdd58ad56","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                                       in self._replication_target_arrays]"},{"line_number":932,"context_line":"        self._stats \u003d data"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _get_replication_capability(self):"},{"line_number":935,"context_line":"        \"\"\"Discovered connected arrays status for replication\"\"\""},{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"}],"source_content_type":"text/x-python","patch_set":2,"id":"6e9f1e64_60629b97","line":934,"in_reply_to":"a29393ab_21f9f73c","updated":"2023-02-15 02:52:36.000000000","message":"My bad. I\u0027m resolving this comment since it\u0027s incomplete. Please refer to the correct comment above.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6a053f795166c87172802ec207926d8f42062e74","unresolved":true,"context_lines":[{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"},{"line_number":938,"context_line":"        if connections:"},{"line_number":939,"context_line":"            for conn in range(0, len(connections)):"},{"line_number":940,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":941,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"async-replication\"):"},{"line_number":942,"context_line":"                    connection_status \u003d \"async\""}],"source_content_type":"text/x-python","patch_set":2,"id":"42da51fe_59db9178","line":939,"updated":"2023-02-15 02:50:21.000000000","message":"nit: I think this could be just \"for conn in connections\" which I believe is more idiomatic, tho I don\u0027t see as a problem keeping the current way.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"546caff4464282f57a4b2e581eaffbfb068bc0ed","unresolved":true,"context_lines":[{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"},{"line_number":938,"context_line":"        if connections:"},{"line_number":939,"context_line":"            for conn in range(0, len(connections)):"},{"line_number":940,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":941,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"async-replication\"):"},{"line_number":942,"context_line":"                    connection_status \u003d \"async\""}],"source_content_type":"text/x-python","patch_set":2,"id":"db6d180a_5c8dc21f","line":939,"in_reply_to":"42da51fe_59db9178","updated":"2023-02-15 17:37:24.000000000","message":"Needs to be this way based on the response from the array. See the unit test","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"d76724c6663b1e78a8a35b682800c8d78a8ae97a","unresolved":false,"context_lines":[{"line_number":936,"context_line":"        connection_status \u003d None"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"},{"line_number":938,"context_line":"        if connections:"},{"line_number":939,"context_line":"            for conn in range(0, len(connections)):"},{"line_number":940,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":941,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"async-replication\"):"},{"line_number":942,"context_line":"                    connection_status \u003d \"async\""}],"source_content_type":"text/x-python","patch_set":2,"id":"f029d910_8c9a7bbd","line":939,"in_reply_to":"db6d180a_5c8dc21f","updated":"2023-02-15 17:37:52.000000000","message":"Done","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":33473,"name":"Atsushi Kawai","display_name":"akawai","email":"atsushi.kawai.bu@hitachi.com","username":"akawai"},"change_message_id":"b12b6496378082207807f4258c575e484c62e038","unresolved":true,"context_lines":[{"line_number":943,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":944,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"sync-replication\"):"},{"line_number":945,"context_line":"                    connection_status \u003d \"sync\""},{"line_number":946,"context_line":"                    break"},{"line_number":947,"context_line":"        return connection_status"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"    def _get_provisioned_space(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3c507ede_5af870b1","line":946,"range":{"start_line":946,"start_character":20,"end_line":946,"end_character":25},"updated":"2023-02-02 11:46:28.000000000","message":"Do you want to retry the `for` loop until finding \"sync\", even if \"async\" is found?\nIf not so, is it better to add another `break` after `connection_status \u003d \"async\"`?","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"674c3ff364d8b076e7b1af3c765486d69dd7e54a","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":944,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"sync-replication\"):"},{"line_number":945,"context_line":"                    connection_status \u003d \"sync\""},{"line_number":946,"context_line":"                    break"},{"line_number":947,"context_line":"        return connection_status"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"    def _get_provisioned_space(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"82e4c43f_2e3bd57f","line":946,"range":{"start_line":946,"start_character":20,"end_line":946,"end_character":25},"in_reply_to":"3c507ede_5af870b1","updated":"2023-02-02 12:34:19.000000000","message":"This is correct, \nWe are looking for the \"highest\" level of replication. Once we find sync that is sufficient. There could be another async in the list after sync and we don\u0027t want that to overwrite the highest capability.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":33473,"name":"Atsushi Kawai","display_name":"akawai","email":"atsushi.kawai.bu@hitachi.com","username":"akawai"},"change_message_id":"2c0c25403c1462fa997e4e1cc9939bcf385cdadc","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":944,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"sync-replication\"):"},{"line_number":945,"context_line":"                    connection_status \u003d \"sync\""},{"line_number":946,"context_line":"                    break"},{"line_number":947,"context_line":"        return connection_status"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"    def _get_provisioned_space(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"15201b70_8e2fd8f3","line":946,"range":{"start_line":946,"start_character":20,"end_line":946,"end_character":25},"in_reply_to":"82e4c43f_2e3bd57f","updated":"2023-02-03 00:12:28.000000000","message":"I see. LGTM.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"bfbf8cabc181399971e60a8c45926b8ff0d3c8ed","unresolved":true,"context_lines":[{"line_number":936,"context_line":"        connection_status \u003d []"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"},{"line_number":938,"context_line":"        if connections:"},{"line_number":939,"context_line":"            for conn in range(0, len(connections)):"},{"line_number":940,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":941,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"async-replication\"):"},{"line_number":942,"context_line":"                    connection_status.append(\"async\")"},{"line_number":943,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":944,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"sync-replication\"):"},{"line_number":945,"context_line":"                    connection_status.append(\"sync\")"},{"line_number":946,"context_line":"            final_status \u003d [*set(connection_status)]"},{"line_number":947,"context_line":"            if \"sync\" in final_status and \"async\" in final_status:"},{"line_number":948,"context_line":"                final_status.append(\"trisync\")"},{"line_number":949,"context_line":"        if final_status:"},{"line_number":950,"context_line":"            return final_status[-1]"},{"line_number":951,"context_line":"        return None"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def _get_provisioned_space(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"93ac22f1_21663471","line":950,"range":{"start_line":939,"start_character":12,"end_line":950,"end_character":35},"updated":"2023-02-16 19:49:35.000000000","message":"from what i understand reading the method is, we want to return if replication is sync, async or trisync(which is sync + async). I think this can be done in another way,\n\n    is_sync, is_async, is_trisync \u003d False, False, False\n    for conn in connections:\n        # If connection status is connected, we can have\n        # either sync or async replication\n        if conn[\"status\"] \u003d\u003d \"connected\":\n            # check for async replication\n            if conn[\"type\"] \u003d\u003d \"async-replication\":\n                is_async \u003d True\n            # check for sync replication\n            elif conn[\"type\"] \u003d\u003d \"sync-replication\":\n                is_sync \u003d True\n        # If we\u0027ve connections for both sync and async\n        # replication, we can set trisync replication\n        # and exit the loop\n        if is_sync and is_async:\n            is_trisync \u003d True\n            break\n    # Check if it is a trisync replication\n    if is_trisync:\n        replication_type \u003d \"trisync\"\n    # If replication is not trisync, it will be either\n    # sync or async\n    else:\n        replication_type \u003d \"sync\" if is_sync else \"async\"\n    return replication_type\n\nReasons for suggesting the new implementation over the old one are:\n* using list variables like connection_status, final_status which consume lot of memory\n* running the for loop over the connections even when one sync and one async connection is detected (sufficient condition for trisync)\n* converting list to set which is again time consuming operation\n* few minor improvements on making the code more readable","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"2f104204a72d217a5590621c4c6658f24d3307fd","unresolved":false,"context_lines":[{"line_number":936,"context_line":"        connection_status \u003d []"},{"line_number":937,"context_line":"        connections \u003d self._get_current_array().list_array_connections()"},{"line_number":938,"context_line":"        if connections:"},{"line_number":939,"context_line":"            for conn in range(0, len(connections)):"},{"line_number":940,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":941,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"async-replication\"):"},{"line_number":942,"context_line":"                    connection_status.append(\"async\")"},{"line_number":943,"context_line":"                if (connections[conn][\"status\"] \u003d\u003d \"connected\" and"},{"line_number":944,"context_line":"                        connections[conn][\"type\"] \u003d\u003d \"sync-replication\"):"},{"line_number":945,"context_line":"                    connection_status.append(\"sync\")"},{"line_number":946,"context_line":"            final_status \u003d [*set(connection_status)]"},{"line_number":947,"context_line":"            if \"sync\" in final_status and \"async\" in final_status:"},{"line_number":948,"context_line":"                final_status.append(\"trisync\")"},{"line_number":949,"context_line":"        if final_status:"},{"line_number":950,"context_line":"            return final_status[-1]"},{"line_number":951,"context_line":"        return None"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def _get_provisioned_space(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bb1eb13c_7f41b1e5","line":950,"range":{"start_line":939,"start_character":12,"end_line":950,"end_character":35},"in_reply_to":"93ac22f1_21663471","updated":"2023-02-16 21:19:14.000000000","message":"This code doesn\u0027t cater for no replication capability, but I have taken your idea and updated the patch.","commit_id":"44ec3566ee49ec27e87ed4abbd19a10b19186f77"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"f36cffc8ecd41398717fe8eeb1720b30a2203550","unresolved":true,"context_lines":[{"line_number":955,"context_line":"        if is_trisync:"},{"line_number":956,"context_line":"            replication_type \u003d \"trisync\""},{"line_number":957,"context_line":"        # If replication is not trisync, it will be either"},{"line_number":958,"context_line":"        # sync or async"},{"line_number":959,"context_line":"        elif is_sync:"},{"line_number":960,"context_line":"            replication_type \u003d \"sync\""},{"line_number":961,"context_line":"        elif is_async:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fe5532c_22e070c4","line":958,"updated":"2023-02-17 13:57:40.000000000","message":"nit: sync, async or None","commit_id":"a87eb136488742e8736b2d12ed1eea1bdd20882c"}],"releasenotes/notes/pure_replication_capability-f9fa78aa96501a69.yaml":[{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"6a053f795166c87172802ec207926d8f42062e74","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Pure Storage driver: Added replication capability to backend pool information."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a3c47133_cc1bfc32","line":4,"updated":"2023-02-15 02:50:21.000000000","message":"Since this is a message aiming cloud operators, it would be nice to have the information that sync includes trisync support as mentioned in the commit message.","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@purestorage.com","username":"sdodsley"},"change_message_id":"546caff4464282f57a4b2e581eaffbfb068bc0ed","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Pure Storage driver: Added replication capability to backend pool information."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1c8558a1_c45b752b","line":4,"in_reply_to":"a3c47133_cc1bfc32","updated":"2023-02-15 17:37:24.000000000","message":"Done","commit_id":"6fc4d48255393c661f4a4ec581b78c0bd6b4f7ce"}]}
