)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"93a554eacf9528842323c35b0a489b686b54bc2e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a5ae5dd_c67be926","line":9,"range":{"start_line":9,"start_character":49,"end_line":9,"end_character":58},"updated":"2016-02-06 09:25:34.000000000","message":"s/HFS/NFS/","commit_id":"24d2c84bda0ac4f01c6ba43a263712c733921e11"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"21808c99500521b0131cfafbdac8d29981b036d3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a5ae5dd_29fe40ae","line":9,"range":{"start_line":9,"start_character":49,"end_line":9,"end_character":58},"in_reply_to":"5a5ae5dd_c67be926","updated":"2016-02-07 15:51:57.000000000","message":"This is already fixed in newest version.","commit_id":"24d2c84bda0ac4f01c6ba43a263712c733921e11"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1a7b0d38_bea5ee04","line":9,"range":{"start_line":9,"start_character":49,"end_line":9,"end_character":50},"updated":"2015-12-28 10:27:44.000000000","message":"s/H/N/","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"9488d5910bbb8be22341c286d68a51fc15090c83","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba63e191_999e3955","line":9,"range":{"start_line":9,"start_character":49,"end_line":9,"end_character":50},"in_reply_to":"1a7b0d38_bea5ee04","updated":"2016-01-19 12:42:33.000000000","message":"Done","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie34c92f8b9dc95d6af5cb150427503bf66543ab6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1a7b0d38_9eab52d6","line":12,"updated":"2015-12-28 10:27:44.000000000","message":"Partially implements bp new-share-access-driver-interface","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"9488d5910bbb8be22341c286d68a51fc15090c83","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Add update_access() method to generic driver, to HFSHelper and CIFSHelper."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Remove allow_access() and deny_access() from helpers."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie34c92f8b9dc95d6af5cb150427503bf66543ab6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba63e191_39a4eda4","line":12,"in_reply_to":"1a7b0d38_9eab52d6","updated":"2016-01-19 12:42:33.000000000","message":"Done","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"e579ef920443f5cd2e51531b5e34446554d01b1a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Barbieri \u003crodrigo.barbieri@fit-tecnologia.org.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-22 09:34:09 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic and LVM drivers,"},{"line_number":10,"context_line":"to NFSHelper and CIFSHelper."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"bae84128_e0229300","line":7,"updated":"2016-02-22 14:15:24.000000000","message":"s/generic/generic+LVM/","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2e0ed7caf28561d275ed0f543610c0693c9422b6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Barbieri \u003crodrigo.barbieri@fit-tecnologia.org.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-22 09:34:09 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement update_access() method in generic driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add update_access() method to generic and LVM drivers,"},{"line_number":10,"context_line":"to NFSHelper and CIFSHelper."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"bae84128_a6f41987","line":7,"in_reply_to":"bae84128_e0229300","updated":"2016-02-22 18:00:09.000000000","message":"Done","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"}],"manila/share/driver.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"07786e1402fa5e2743cf368e1eb043a771b4a211","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\""},{"line_number":583,"context_line":"        raise NotImplementedError()"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"    def allow_access(self, context, share, access, share_server\u003dNone):"},{"line_number":586,"context_line":"        \"\"\"Allow access to the share.\"\"\""},{"line_number":587,"context_line":"        raise NotImplementedError()"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_13ae4ee6","side":"PARENT","line":585,"updated":"2015-12-11 12:47:34.000000000","message":"I wouldn\u0027t remove these methods in this commit. I think Igor\u0027s commit should remove them.","commit_id":"eea8f8bdb694e336314ac4bba4fcfc0be9b2099b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bf92f545269d2129619d171796bb0fc06eca729d","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\""},{"line_number":583,"context_line":"        raise NotImplementedError()"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"    def allow_access(self, context, share, access, share_server\u003dNone):"},{"line_number":586,"context_line":"        \"\"\"Allow access to the share.\"\"\""},{"line_number":587,"context_line":"        raise NotImplementedError()"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_1397e03a","side":"PARENT","line":585,"in_reply_to":"7a740942_02da2f17","updated":"2015-12-14 10:50:04.000000000","message":"I agree, a subsequent patch that should remove the legacy approach (the code section you linked), later in Mitaka, should also remove this code.","commit_id":"eea8f8bdb694e336314ac4bba4fcfc0be9b2099b"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"a887f1202c199ccdd9e4ab006795cb41a9bab759","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\""},{"line_number":583,"context_line":"        raise NotImplementedError()"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"    def allow_access(self, context, share, access, share_server\u003dNone):"},{"line_number":586,"context_line":"        \"\"\"Allow access to the share.\"\"\""},{"line_number":587,"context_line":"        raise NotImplementedError()"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_02da2f17","side":"PARENT","line":585,"in_reply_to":"7a740942_13ae4ee6","updated":"2015-12-14 09:14:26.000000000","message":"Rodrigo, seems that I cannot change this file and remove allow_access and deny_access from driver interface in this commit, because at first we need to implement update_access in all drivers. Please see https://review.openstack.org/#/c/245126/10/manila/share/access.py - from Igor\u0027s commit.  That\u0027s why Igor\u0027s commit shouldn\u0027t remove them as well. Please correct me if I\u0027m wrong.","commit_id":"eea8f8bdb694e336314ac4bba4fcfc0be9b2099b"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"a7da7f3931d1d5aad04b165249d1611ad844274a","unresolved":false,"context_lines":[{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        Drivers should support 2 different cases in this method:"},{"line_number":638,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"},{"line_number":639,"context_line":"        \u0027add_rules\u0027 and \u0027delete_rules\u0027 shall be None. Driver should clear any"},{"line_number":640,"context_line":"        existent access rules and apply all access rules for given share."},{"line_number":641,"context_line":"        This recovery is made at driver start up."},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"bae84128_6ab3ebe9","line":639,"range":{"start_line":639,"start_character":48,"end_line":639,"end_character":52},"updated":"2016-02-22 21:58:27.000000000","message":"None or an empty list?  The code appears to return empty lists and never set access_rules, add_rules or delete_rules to None.  If they could be None, then each driver would need to check for None, so I think these should always be lists.  If you agree, please fix this docstring.","commit_id":"8a6c3a75a6465b075174c8ea6fa6250049b8b695"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"6c199b45c8e475c723c7b598b9e2a7b99bbf31f2","unresolved":false,"context_lines":[{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        Drivers should support 2 different cases in this method:"},{"line_number":638,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"},{"line_number":639,"context_line":"        \u0027add_rules\u0027 and \u0027delete_rules\u0027 shall be None. Driver should clear any"},{"line_number":640,"context_line":"        existent access rules and apply all access rules for given share."},{"line_number":641,"context_line":"        This recovery is made at driver start up."},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"bae84128_cb01563a","line":639,"range":{"start_line":639,"start_character":48,"end_line":639,"end_character":52},"in_reply_to":"bae84128_6ab3ebe9","updated":"2016-02-23 00:52:30.000000000","message":"Hi Clinton, I am a bit confused by your question. Docstring says that the driver interface will receive those variables defined as \"None\" in Recovery mode. Yes, all drivers are checking for None. If the manager and access helper would call this method with empty lists instead of None drivers would not need to check for None.\n\nIn this case, it is not the docstring that is wrong, it is the manager and access helper that should be changed to supply empty lists, and then the docstring updated. Consequently, all driver developers need to update their patches with the updated method declaration and not check for None anymore. This change needs to be performed in another patch, not here, so all drivers can rebase on top.","commit_id":"8a6c3a75a6465b075174c8ea6fa6250049b8b695"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"15e01953add43c0a277aa4036005be095f96d7c1","unresolved":false,"context_lines":[{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        Drivers should support 2 different cases in this method:"},{"line_number":638,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"},{"line_number":639,"context_line":"        \u0027add_rules\u0027 and \u0027delete_rules\u0027 shall be None. Driver should clear any"},{"line_number":640,"context_line":"        existent access rules and apply all access rules for given share."},{"line_number":641,"context_line":"        This recovery is made at driver start up."},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"bae84128_5925c359","line":639,"range":{"start_line":639,"start_character":48,"end_line":639,"end_character":52},"in_reply_to":"bae84128_cb01563a","updated":"2016-02-24 11:56:24.000000000","message":"As discussed on IRC, a patch to fix docstring and driver interface method signature will be submitted later and separately to address this, also updating all affected drivers.","commit_id":"8a6c3a75a6465b075174c8ea6fa6250049b8b695"}],"manila/share/drivers/generic.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"07786e1402fa5e2743cf368e1eb043a771b4a211","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                                                  access\u003daccess_to)"},{"line_number":1232,"context_line":""},{"line_number":1233,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1234,"context_line":"            for access in access_rules:"},{"line_number":1235,"context_line":"                self._ssh_exec("},{"line_number":1236,"context_line":"                    server,"},{"line_number":1237,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_13408e33","line":1234,"updated":"2015-12-11 12:47:34.000000000","message":"I believe that before executing the command that adds these rules, the access rules should be cleared in the backend, so you add only what is in the access_rules list. This would be the equivalent of maintenance mode.","commit_id":"e4e46c251658781f1c9762445565937177932cf0"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"483d69328e9b3b7c139f5040cd66072229a86b7f","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                                                  access\u003daccess_to)"},{"line_number":1232,"context_line":""},{"line_number":1233,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1234,"context_line":"            for access in access_rules:"},{"line_number":1235,"context_line":"                self._ssh_exec("},{"line_number":1236,"context_line":"                    server,"},{"line_number":1237,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_55b1c5de","line":1234,"in_reply_to":"7a740942_13408e33","updated":"2015-12-14 13:50:01.000000000","message":"Done","commit_id":"e4e46c251658781f1c9762445565937177932cf0"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"07786e1402fa5e2743cf368e1eb043a771b4a211","unresolved":false,"context_lines":[{"line_number":1385,"context_line":""},{"line_number":1386,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1387,"context_line":"            for access in access_rules:"},{"line_number":1388,"context_line":"                hosts.append(access[\u0027access_to\u0027])"},{"line_number":1389,"context_line":"        else:"},{"line_number":1390,"context_line":"            for access in add_rules:"},{"line_number":1391,"context_line":"                hosts.append(access[\u0027access_to\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_7819b187","line":1388,"updated":"2015-12-11 12:47:34.000000000","message":"If I understood the proposal correctly, this list should not contain the previous items, it should be empty and then only add everything in access_rules. This would be the equivalent of maintenance mode.","commit_id":"e4e46c251658781f1c9762445565937177932cf0"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"483d69328e9b3b7c139f5040cd66072229a86b7f","unresolved":false,"context_lines":[{"line_number":1385,"context_line":""},{"line_number":1386,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1387,"context_line":"            for access in access_rules:"},{"line_number":1388,"context_line":"                hosts.append(access[\u0027access_to\u0027])"},{"line_number":1389,"context_line":"        else:"},{"line_number":1390,"context_line":"            for access in add_rules:"},{"line_number":1391,"context_line":"                hosts.append(access[\u0027access_to\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_55e8e5b2","line":1388,"in_reply_to":"7a740942_7819b187","updated":"2015-12-14 13:50:01.000000000","message":"Done","commit_id":"e4e46c251658781f1c9762445565937177932cf0"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"93a554eacf9528842323c35b0a489b686b54bc2e","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    @ensure_server"},{"line_number":793,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003dNone,"},{"line_number":794,"context_line":"                      delete_rules\u003dNone, share_server\u003dNone):"},{"line_number":795,"context_line":"        for access in add_rules:"},{"line_number":796,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":797,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":798,"context_line":"                raise exception.InvalidShareAccessLevel("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_46f059fe","line":795,"updated":"2016-02-06 09:25:34.000000000","message":"if add_rules...","commit_id":"24d2c84bda0ac4f01c6ba43a263712c733921e11"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"21808c99500521b0131cfafbdac8d29981b036d3","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    @ensure_server"},{"line_number":793,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003dNone,"},{"line_number":794,"context_line":"                      delete_rules\u003dNone, share_server\u003dNone):"},{"line_number":795,"context_line":"        for access in add_rules:"},{"line_number":796,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":797,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":798,"context_line":"                raise exception.InvalidShareAccessLevel("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_a928f033","line":795,"in_reply_to":"5a5ae5dd_46f059fe","updated":"2016-02-07 15:51:57.000000000","message":"This is already fixed in newest version.","commit_id":"24d2c84bda0ac4f01c6ba43a263712c733921e11"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1c04d4c84fe421ea24ac811cfd9e921fb760c70a","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":798,"context_line":"                raise exception.InvalidShareAccessLevel("},{"line_number":799,"context_line":"                    level\u003daccess[\u0027access_level\u0027])"},{"line_number":800,"context_line":"        self._get_helper(share).update_access(share_server[\u0027backend_details\u0027],"},{"line_number":801,"context_line":"                                              share[\u0027name\u0027], access_rules,"},{"line_number":802,"context_line":"                                              add_rules\u003dadd_rules,"},{"line_number":803,"context_line":"                                              delete_rules\u003ddelete_rules)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_f77fe0a8","line":800,"range":{"start_line":800,"start_character":46,"end_line":800,"end_character":58},"updated":"2015-12-18 18:14:56.000000000","message":"share_server here can be None according to the params..","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"39e67f7df8ce3ad652ae23970b1b1376b79dac8b","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":798,"context_line":"                raise exception.InvalidShareAccessLevel("},{"line_number":799,"context_line":"                    level\u003daccess[\u0027access_level\u0027])"},{"line_number":800,"context_line":"        self._get_helper(share).update_access(share_server[\u0027backend_details\u0027],"},{"line_number":801,"context_line":"                                              share[\u0027name\u0027], access_rules,"},{"line_number":802,"context_line":"                                              add_rules\u003dadd_rules,"},{"line_number":803,"context_line":"                                              delete_rules\u003ddelete_rules)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_37da1ae9","line":800,"range":{"start_line":800,"start_character":46,"end_line":800,"end_character":58},"in_reply_to":"3a7e1126_f77fe0a8","updated":"2015-12-21 11:00:51.000000000","message":"Yes, but generic driver has \u0027ensure_server\u0027 decorator to ensure that share_server is not None and it has \u0027backend_details\u0027 attribute.","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1c04d4c84fe421ea24ac811cfd9e921fb760c70a","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"        for access in add_rules:"},{"line_number":1224,"context_line":"            access_to, access_type \u003d access[\u0027access_to\u0027], access[\u0027access_type\u0027]"},{"line_number":1225,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":1226,"context_line":"                reason \u003d \u0027only ip access type allowed\u0027"},{"line_number":1227,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":1228,"context_line":"            found_item \u003d re.search("},{"line_number":1229,"context_line":"                re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to), out)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_6207b018","line":1226,"range":{"start_line":1226,"start_character":26,"end_line":1226,"end_character":30},"updated":"2015-12-18 18:14:56.000000000","message":"s/only/Only\n\n\nPlease use _() from i18 for exception messages\n\n\nAlso, missing period","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"39e67f7df8ce3ad652ae23970b1b1376b79dac8b","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"        for access in add_rules:"},{"line_number":1224,"context_line":"            access_to, access_type \u003d access[\u0027access_to\u0027], access[\u0027access_type\u0027]"},{"line_number":1225,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":1226,"context_line":"                reason \u003d \u0027only ip access type allowed\u0027"},{"line_number":1227,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":1228,"context_line":"            found_item \u003d re.search("},{"line_number":1229,"context_line":"                re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to), out)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_7a22c9a4","line":1226,"range":{"start_line":1226,"start_character":26,"end_line":1226,"end_character":30},"in_reply_to":"3a7e1126_6207b018","updated":"2015-12-21 11:00:51.000000000","message":"Done","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1c04d4c84fe421ea24ac811cfd9e921fb760c70a","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":1380,"context_line":"                reason \u003d \u0027only ip access type allowed\u0027"},{"line_number":1381,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":1382,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":1383,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_226be8b8","line":1380,"range":{"start_line":1380,"start_character":26,"end_line":1380,"end_character":30},"updated":"2015-12-18 18:14:56.000000000","message":"same here","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"39e67f7df8ce3ad652ae23970b1b1376b79dac8b","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":1380,"context_line":"                reason \u003d \u0027only ip access type allowed\u0027"},{"line_number":1381,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":1382,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":1383,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_ba2cb199","line":1380,"range":{"start_line":1380,"start_character":26,"end_line":1380,"end_character":30},"in_reply_to":"3a7e1126_226be8b8","updated":"2015-12-21 11:00:51.000000000","message":"Done","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1c04d4c84fe421ea24ac811cfd9e921fb760c70a","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"            for access in delete_rules:"},{"line_number":1397,"context_line":"                if access[\u0027access_to\u0027] in hosts:"},{"line_number":1398,"context_line":"                    # Access rule can be in error state, if so"},{"line_number":1399,"context_line":"                    #  it can be absent in rules, hence - skip removal."},{"line_number":1400,"context_line":"                    hosts.remove(access[\u0027access_to\u0027])"},{"line_number":1401,"context_line":"        self._set_allow_hosts(server, hosts, share_name)"},{"line_number":1402,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_22c76897","line":1399,"range":{"start_line":1399,"start_character":23,"end_line":1399,"end_character":25},"updated":"2015-12-18 18:14:56.000000000","message":"s/ it/it (remove preceding space)","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"39e67f7df8ce3ad652ae23970b1b1376b79dac8b","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"            for access in delete_rules:"},{"line_number":1397,"context_line":"                if access[\u0027access_to\u0027] in hosts:"},{"line_number":1398,"context_line":"                    # Access rule can be in error state, if so"},{"line_number":1399,"context_line":"                    #  it can be absent in rules, hence - skip removal."},{"line_number":1400,"context_line":"                    hosts.remove(access[\u0027access_to\u0027])"},{"line_number":1401,"context_line":"        self._set_allow_hosts(server, hosts, share_name)"},{"line_number":1402,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_5a1fcd5a","line":1399,"range":{"start_line":1399,"start_character":23,"end_line":1399,"end_character":25},"in_reply_to":"3a7e1126_22c76897","updated":"2015-12-21 11:00:51.000000000","message":"Done","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"7dedd48a2d582dfea784d968d6ea27d2ae153d96","unresolved":false,"context_lines":[{"line_number":793,"context_line":"    @ensure_server"},{"line_number":794,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003dNone,"},{"line_number":795,"context_line":"                      delete_rules\u003dNone, share_server\u003dNone):"},{"line_number":796,"context_line":"        for access in add_rules:"},{"line_number":797,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":798,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":799,"context_line":"                raise exception.InvalidShareAccessLevel("}],"source_content_type":"text/x-python","patch_set":11,"id":"9a68dd71_e0cd11b8","line":796,"range":{"start_line":796,"start_character":8,"end_line":796,"end_character":32},"updated":"2016-01-21 18:31:22.000000000","message":"This loop will throw an error if add_rules is None. Please add assignments that change add_rules and delete_rules to [] if they are None.","commit_id":"81f906028b8c968a306bdb638e34cc6059536933"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"cea0a78e910acf08841468e5b6c6b12f41565b11","unresolved":false,"context_lines":[{"line_number":799,"context_line":"                share_server[\u0027backend_details\u0027], share[\u0027name\u0027], recreate\u003dTrue)"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"    @ensure_server"},{"line_number":802,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003d[],"},{"line_number":803,"context_line":"                      delete_rules\u003d[], share_server\u003dNone):"},{"line_number":804,"context_line":"        for access in add_rules:"},{"line_number":805,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":806,"context_line":"                                              const.ACCESS_LEVEL_RO):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_d4a4d84b","line":803,"range":{"start_line":802,"start_character":8,"end_line":803,"end_character":58},"updated":"2016-01-25 10:30:11.000000000","message":"Hi Julia. I believe you should not use mutable arguments.\nPlease see: https://review.openstack.org/#/c/268580/","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"cea0a78e910acf08841468e5b6c6b12f41565b11","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"        pass"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":"    @nfs_synchronized"},{"line_number":1226,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003d[],"},{"line_number":1227,"context_line":"                      delete_rules\u003d[]):"},{"line_number":1228,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":1229,"context_line":"        local_path \u003d os.path.join(self.configuration.share_mount_path,"},{"line_number":1230,"context_line":"                                  share_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_74664c2b","line":1227,"range":{"start_line":1226,"start_character":4,"end_line":1227,"end_character":39},"updated":"2016-01-25 10:30:11.000000000","message":"Here as well. Please see: https://review.openstack.org/#/c/268580/","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bb4bfcb6caa8b3235f8626a5bd26fe49d35a8a2f","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"                raise exception.ShareAccessExists(access_type\u003daccess_type,"},{"line_number":1241,"context_line":"                                                  access\u003daccess_to)"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1244,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027, local_path])"},{"line_number":1245,"context_line":"            for access in access_rules:"},{"line_number":1246,"context_line":"                self._ssh_exec("},{"line_number":1247,"context_line":"                    server,"},{"line_number":1248,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":1249,"context_line":"                     \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":1250,"context_line":"                     \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":1251,"context_line":"        else:"},{"line_number":1252,"context_line":"            for access in add_rules:"},{"line_number":1253,"context_line":"                self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_8e072481","line":1250,"range":{"start_line":1243,"start_character":8,"end_line":1250,"end_character":66},"updated":"2016-01-25 14:08:27.000000000","message":"Something crazy is going on here, I can\u0027t understand what it is. I have a list with 6 access_rules, 3 \u0027rw\u0027 and 3 \u0027ro\u0027, and I pass a list of the same access rules but this time all \u0027ro\u0027. When the code reaches this part, I added some logs and I can verify they all are \u0027ro\u0027. I added sleep after \u0027exportfs -u\u0027 and nothing happens when the command is executed. Later, for each rule applied, it changes to \u0027ro\u0027 the rule being applied, but later as soon as it is going to apply another rule, the previous is reverted back to \u0027rw\u0027, and the new one becomes \u0027ro\u0027. \n\nI also tried to run \u0027_sync_nfs_temp_and_perm_files\u0027 right after each command, including \u0027exportfs -u\u0027, but still does not fix the problem.\n\nThe logic looks alright, but I don\u0027t understand why the exportfs is not behaving like it should.","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2080d217b3167479cd3ff814926a73766d1d40fb","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"                raise exception.ShareAccessExists(access_type\u003daccess_type,"},{"line_number":1241,"context_line":"                                                  access\u003daccess_to)"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1244,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027, local_path])"},{"line_number":1245,"context_line":"            for access in access_rules:"},{"line_number":1246,"context_line":"                self._ssh_exec("},{"line_number":1247,"context_line":"                    server,"},{"line_number":1248,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":1249,"context_line":"                     \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":1250,"context_line":"                     \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":1251,"context_line":"        else:"},{"line_number":1252,"context_line":"            for access in add_rules:"},{"line_number":1253,"context_line":"                self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_b0711a0e","line":1250,"range":{"start_line":1243,"start_character":8,"end_line":1250,"end_character":66},"in_reply_to":"9a68dd71_8e072481","updated":"2016-01-25 17:04:53.000000000","message":"It seems like \"sudo exportfs -u /shares/share-something\" does not work to remove all entries for a share. I also tested \"sudo exportfs -u *:/shares/share-something\" in the service-image but that still does not work. Maybe we will need a parser for exportfs output and then remove entries manually. So far this is my only idea, I can work on this parser if you don\u0027t mind.","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dc7d84323e35c9b64b6644a79538172fe3e87e8d","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"                raise exception.ShareAccessExists(access_type\u003daccess_type,"},{"line_number":1241,"context_line":"                                                  access\u003daccess_to)"},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":1244,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027, local_path])"},{"line_number":1245,"context_line":"            for access in access_rules:"},{"line_number":1246,"context_line":"                self._ssh_exec("},{"line_number":1247,"context_line":"                    server,"},{"line_number":1248,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":1249,"context_line":"                     \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":1250,"context_line":"                     \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":1251,"context_line":"        else:"},{"line_number":1252,"context_line":"            for access in add_rules:"},{"line_number":1253,"context_line":"                self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_5534f4dc","line":1250,"range":{"start_line":1243,"start_character":8,"end_line":1250,"end_character":66},"in_reply_to":"9a68dd71_b0711a0e","updated":"2016-01-27 08:43:41.000000000","message":"Hello, Rodrigo! Thank you for finding this bug! It would be great if you could work on the parser to fix the problem.","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"cea0a78e910acf08841468e5b6c6b12f41565b11","unresolved":false,"context_lines":[{"line_number":1376,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027smbcontrol\u0027, \u0027all\u0027, \u0027close-share\u0027,"},{"line_number":1377,"context_line":"                                    share_name])"},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003d[],"},{"line_number":1380,"context_line":"                      delete_rules\u003d[]):"},{"line_number":1381,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"        for access in add_rules:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_b480448c","line":1380,"range":{"start_line":1379,"start_character":3,"end_line":1380,"end_character":39},"updated":"2016-01-25 10:30:11.000000000","message":"Here as well. Please see: https://review.openstack.org/#/c/268580/","commit_id":"32f3bfa1a7e36131a2b3fc2bf0a9990c578ba75b"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"4241e6671af49de8b35c20e438d4d7e194cad210","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @ensure_server"},{"line_number":800,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003dNone,"},{"line_number":801,"context_line":"                      delete_rules\u003dNone, share_server\u003dNone):"},{"line_number":802,"context_line":"        if add_rules is None:"},{"line_number":803,"context_line":"            add_rules \u003d []"},{"line_number":804,"context_line":"        if delete_rules is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_ed4fc231","line":801,"updated":"2016-02-08 11:32:19.000000000","message":"Can we add some more documentation about the functions parameters? For me allow_access and deny_access had a straight forward logic but now it\u0027s not obvious what \"add_rules\" and \"delete_rules\" are actually doing.","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"fa888ee86f4a4fb011a08398294c946b5b7c0c6f","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @ensure_server"},{"line_number":800,"context_line":"    def update_access(self, context, share, access_rules, add_rules\u003dNone,"},{"line_number":801,"context_line":"                      delete_rules\u003dNone, share_server\u003dNone):"},{"line_number":802,"context_line":"        if add_rules is None:"},{"line_number":803,"context_line":"            add_rules \u003d []"},{"line_number":804,"context_line":"        if delete_rules is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_41157e99","line":801,"in_reply_to":"5a5ae5dd_ed4fc231","updated":"2016-02-08 14:08:35.000000000","message":"Done","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":820,"context_line":"               removed. access_rules doesn\u0027t contain these rules."},{"line_number":821,"context_line":"        :param share_server: None or Share server model"},{"line_number":822,"context_line":"        \"\"\""},{"line_number":823,"context_line":"        if add_rules is None:"},{"line_number":824,"context_line":"            add_rules \u003d []"},{"line_number":825,"context_line":"        if delete_rules is None:"},{"line_number":826,"context_line":"            delete_rules \u003d []"},{"line_number":827,"context_line":"        for access in add_rules:"},{"line_number":828,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":829,"context_line":"                                              const.ACCESS_LEVEL_RO):"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_5df51181","line":826,"range":{"start_line":823,"start_character":0,"end_line":826,"end_character":29},"updated":"2016-02-09 17:01:24.000000000","message":"You could use manila.share.utils.convert_none_to_list for this conversion.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":820,"context_line":"               removed. access_rules doesn\u0027t contain these rules."},{"line_number":821,"context_line":"        :param share_server: None or Share server model"},{"line_number":822,"context_line":"        \"\"\""},{"line_number":823,"context_line":"        if add_rules is None:"},{"line_number":824,"context_line":"            add_rules \u003d []"},{"line_number":825,"context_line":"        if delete_rules is None:"},{"line_number":826,"context_line":"            delete_rules \u003d []"},{"line_number":827,"context_line":"        for access in add_rules:"},{"line_number":828,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":829,"context_line":"                                              const.ACCESS_LEVEL_RO):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_c44cfe78","line":826,"range":{"start_line":823,"start_character":0,"end_line":826,"end_character":29},"in_reply_to":"5a5ae5dd_5df51181","updated":"2016-02-10 11:49:02.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":824,"context_line":"            add_rules \u003d []"},{"line_number":825,"context_line":"        if delete_rules is None:"},{"line_number":826,"context_line":"            delete_rules \u003d []"},{"line_number":827,"context_line":"        for access in add_rules:"},{"line_number":828,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":829,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":830,"context_line":"                raise exception.InvalidShareAccessLevel("},{"line_number":831,"context_line":"                    level\u003daccess[\u0027access_level\u0027])"},{"line_number":832,"context_line":"        self._get_helper(share).update_access(share_server[\u0027backend_details\u0027],"},{"line_number":833,"context_line":"                                              share[\u0027name\u0027], access_rules,"},{"line_number":834,"context_line":"                                              add_rules\u003dadd_rules,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_7daa4d87","line":831,"range":{"start_line":827,"start_character":0,"end_line":831,"end_character":49},"updated":"2016-02-09 17:01:24.000000000","message":"This verification is not needed. This is verified on the API: https://github.com/openstack/manila/blob/master/manila/share/api.py#L829","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":824,"context_line":"            add_rules \u003d []"},{"line_number":825,"context_line":"        if delete_rules is None:"},{"line_number":826,"context_line":"            delete_rules \u003d []"},{"line_number":827,"context_line":"        for access in add_rules:"},{"line_number":828,"context_line":"            if access[\u0027access_level\u0027] not in (const.ACCESS_LEVEL_RW,"},{"line_number":829,"context_line":"                                              const.ACCESS_LEVEL_RO):"},{"line_number":830,"context_line":"                raise exception.InvalidShareAccessLevel("},{"line_number":831,"context_line":"                    level\u003daccess[\u0027access_level\u0027])"},{"line_number":832,"context_line":"        self._get_helper(share).update_access(share_server[\u0027backend_details\u0027],"},{"line_number":833,"context_line":"                                              share[\u0027name\u0027], access_rules,"},{"line_number":834,"context_line":"                                              add_rules\u003dadd_rules,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_84560605","line":831,"range":{"start_line":827,"start_character":0,"end_line":831,"end_character":49},"in_reply_to":"5a5ae5dd_7daa4d87","updated":"2016-02-10 11:49:02.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"}],"manila/share/drivers/helpers.py":[{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"4241e6671af49de8b35c20e438d4d7e194cad210","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    @nfs_synchronized"},{"line_number":128,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":129,"context_line":"                      delete_rules\u003dNone):"},{"line_number":130,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":131,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":132,"context_line":"        local_path \u003d os.path.join(self.configuration.share_mount_path,"},{"line_number":133,"context_line":"                                  share_name)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_edeb42da","line":130,"updated":"2016-02-08 11:32:19.000000000","message":"I guess documentation is here much more needed since is a helper module that can be used from different drivers :)","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"fa888ee86f4a4fb011a08398294c946b5b7c0c6f","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    @nfs_synchronized"},{"line_number":128,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":129,"context_line":"                      delete_rules\u003dNone):"},{"line_number":130,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":131,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":132,"context_line":"        local_path \u003d os.path.join(self.configuration.share_mount_path,"},{"line_number":133,"context_line":"                                  share_name)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_e1f6ea8d","line":130,"in_reply_to":"5a5ae5dd_edeb42da","updated":"2016-02-08 14:08:35.000000000","message":"Done","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"4241e6671af49de8b35c20e438d4d7e194cad210","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":129,"context_line":"                      delete_rules\u003dNone):"},{"line_number":130,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":131,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":132,"context_line":"        local_path \u003d os.path.join(self.configuration.share_mount_path,"},{"line_number":133,"context_line":"                                  share_name)"},{"line_number":134,"context_line":"        out, err \u003d self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027])"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_4dd056c9","line":131,"updated":"2016-02-08 11:32:19.000000000","message":"Why do we have to transform them into lists? Why can\u0027t we simply check for None?","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"fa888ee86f4a4fb011a08398294c946b5b7c0c6f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":129,"context_line":"                      delete_rules\u003dNone):"},{"line_number":130,"context_line":"        \"\"\"Update access rules list.\"\"\""},{"line_number":131,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":132,"context_line":"        local_path \u003d os.path.join(self.configuration.share_mount_path,"},{"line_number":133,"context_line":"                                  share_name)"},{"line_number":134,"context_line":"        out, err \u003d self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027])"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_21008265","line":131,"in_reply_to":"5a5ae5dd_4dd056c9","updated":"2016-02-08 14:08:35.000000000","message":"I created a function because this code was going to be repeated several times.","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"4241e6671af49de8b35c20e438d4d7e194cad210","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":311,"context_line":"                      delete_rules\u003dNone):"},{"line_number":312,"context_line":"        \"\"\"Update IP access rules list.\"\"\""},{"line_number":313,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":314,"context_line":"        hosts \u003d []"},{"line_number":315,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":316,"context_line":"            self._check_valid_access(access_rules)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_083eccc0","line":313,"updated":"2016-02-08 11:32:19.000000000","message":"See above","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"fa888ee86f4a4fb011a08398294c946b5b7c0c6f","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":311,"context_line":"                      delete_rules\u003dNone):"},{"line_number":312,"context_line":"        \"\"\"Update IP access rules list.\"\"\""},{"line_number":313,"context_line":"        add_rules, delete_rules \u003d convert_none_to_list(add_rules, delete_rules)"},{"line_number":314,"context_line":"        hosts \u003d []"},{"line_number":315,"context_line":"        if not (add_rules or delete_rules):"},{"line_number":316,"context_line":"            self._check_valid_access(access_rules)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_a1ec72bb","line":313,"in_reply_to":"5a5ae5dd_083eccc0","updated":"2016-02-08 14:08:35.000000000","message":"See reply above.","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"4241e6671af49de8b35c20e438d4d7e194cad210","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                                param, value])"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"def convert_none_to_list(list1, list2):"},{"line_number":483,"context_line":"    if list1 is None:"},{"line_number":484,"context_line":"        list1 \u003d []"},{"line_number":485,"context_line":"    if list2 is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_ad66aa4e","line":482,"updated":"2016-02-08 11:32:19.000000000","message":"This function doesn\u0027t look nice IMHO. Why does it only have two parameters? I have doubts that we need this function at all. + If we need it: please add documentation","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"fa888ee86f4a4fb011a08398294c946b5b7c0c6f","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                                param, value])"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"def convert_none_to_list(list1, list2):"},{"line_number":483,"context_line":"    if list1 is None:"},{"line_number":484,"context_line":"        list1 \u003d []"},{"line_number":485,"context_line":"    if list2 is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_952e50a3","line":482,"in_reply_to":"5a5ae5dd_ad66aa4e","updated":"2016-02-08 14:08:35.000000000","message":"Done. Moved it to share/utils.py.","commit_id":"bd397f097a79dbeb4492a871bd9ff505e32a8d27"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":124,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":125,"context_line":"                reason \u003d _(\"Only IP access type allowed.\")"},{"line_number":126,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @nfs_synchronized"},{"line_number":129,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_9dece990","line":126,"range":{"start_line":126,"start_character":51,"end_line":126,"end_character":57},"updated":"2016-02-09 17:01:24.000000000","message":"reason\u003dreason","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":124,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":125,"context_line":"                reason \u003d _(\"Only IP access type allowed.\")"},{"line_number":126,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @nfs_synchronized"},{"line_number":129,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_64c18a80","line":126,"range":{"start_line":126,"start_character":51,"end_line":126,"end_character":57},"in_reply_to":"5a5ae5dd_9dece990","updated":"2016-02-10 11:49:02.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                found_item \u003d re.search("},{"line_number":177,"context_line":"                    re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to),"},{"line_number":178,"context_line":"                    out)"},{"line_number":179,"context_line":"                if found_item is not None:"},{"line_number":180,"context_line":"                    raise exception.ShareAccessExists(access_type\u003daccess_type,"},{"line_number":181,"context_line":"                                                      access\u003daccess_to)"},{"line_number":182,"context_line":"            for access in add_rules:"},{"line_number":183,"context_line":"                self._ssh_exec("},{"line_number":184,"context_line":"                    server,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_201d8abd","line":181,"range":{"start_line":179,"start_character":0,"end_line":181,"end_character":71},"updated":"2016-02-09 17:01:24.000000000","message":"Should it fail or just warn the user? I believe this should just warn the user that the rule already exists, instead of raising an exception. The API will block duplicate rules anyway, so it is unlikely that this condition will ever be true, but in the case that this happens, I don\u0027t see why this should fail.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                found_item \u003d re.search("},{"line_number":177,"context_line":"                    re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to),"},{"line_number":178,"context_line":"                    out)"},{"line_number":179,"context_line":"                if found_item is not None:"},{"line_number":180,"context_line":"                    raise exception.ShareAccessExists(access_type\u003daccess_type,"},{"line_number":181,"context_line":"                                                      access\u003daccess_to)"},{"line_number":182,"context_line":"            for access in add_rules:"},{"line_number":183,"context_line":"                self._ssh_exec("},{"line_number":184,"context_line":"                    server,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_87d048cb","line":181,"range":{"start_line":179,"start_character":0,"end_line":181,"end_character":71},"in_reply_to":"5a5ae5dd_201d8abd","updated":"2016-02-10 11:49:02.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":328,"context_line":"                reason \u003d _(\u0027Only IP access type allowed.\u0027)"},{"line_number":329,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":330,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":331,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_4b9307a4","line":329,"range":{"start_line":329,"start_character":51,"end_line":329,"end_character":57},"updated":"2016-02-09 17:01:24.000000000","message":"reason\u003dreason","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":328,"context_line":"                reason \u003d _(\u0027Only IP access type allowed.\u0027)"},{"line_number":329,"context_line":"                raise exception.InvalidShareAccess(reason)"},{"line_number":330,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":331,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_44256ec0","line":329,"range":{"start_line":329,"start_character":51,"end_line":329,"end_character":57},"in_reply_to":"5a5ae5dd_4b9307a4","updated":"2016-02-10 11:49:02.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            self._check_valid_access(add_rules)"},{"line_number":366,"context_line":"            hosts \u003d self._get_allow_hosts(server, share_name)"},{"line_number":367,"context_line":"            for access in add_rules:"},{"line_number":368,"context_line":"                if access[\u0027access_to\u0027] in hosts:"},{"line_number":369,"context_line":"                    raise exception.ShareAccessExists("},{"line_number":370,"context_line":"                        access_type\u003daccess[\u0027access_type\u0027],"},{"line_number":371,"context_line":"                        access\u003daccess[\u0027access_to\u0027])"},{"line_number":372,"context_line":"                hosts.append(access[\u0027access_to\u0027])"},{"line_number":373,"context_line":"            for access in delete_rules:"},{"line_number":374,"context_line":"                if access[\u0027access_to\u0027] in hosts:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_8b249faf","line":371,"range":{"start_line":368,"start_character":0,"end_line":371,"end_character":51},"updated":"2016-02-09 17:01:24.000000000","message":"Same here. I don\u0027t see why this should fail instead of just warning.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            self._check_valid_access(add_rules)"},{"line_number":366,"context_line":"            hosts \u003d self._get_allow_hosts(server, share_name)"},{"line_number":367,"context_line":"            for access in add_rules:"},{"line_number":368,"context_line":"                if access[\u0027access_to\u0027] in hosts:"},{"line_number":369,"context_line":"                    raise exception.ShareAccessExists("},{"line_number":370,"context_line":"                        access_type\u003daccess[\u0027access_type\u0027],"},{"line_number":371,"context_line":"                        access\u003daccess[\u0027access_to\u0027])"},{"line_number":372,"context_line":"                hosts.append(access[\u0027access_to\u0027])"},{"line_number":373,"context_line":"            for access in delete_rules:"},{"line_number":374,"context_line":"                if access[\u0027access_to\u0027] in hosts:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_67ad0c31","line":371,"range":{"start_line":368,"start_character":0,"end_line":371,"end_character":51},"in_reply_to":"5a5ae5dd_8b249faf","updated":"2016-02-10 11:49:02.000000000","message":"Removed this code.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                                                 const.ACCESS_LEVEL_RO)"},{"line_number":504,"context_line":"            all_users \u003d all_users_ro + all_users_rw"},{"line_number":505,"context_line":"            for access in add_rules:"},{"line_number":506,"context_line":"                if access[\u0027access_to\u0027] in all_users:"},{"line_number":507,"context_line":"                    raise exception.ShareAccessExists("},{"line_number":508,"context_line":"                        access_type\u003daccess[\u0027access_type\u0027],"},{"line_number":509,"context_line":"                        access\u003daccess[\u0027access_to\u0027])"},{"line_number":510,"context_line":"                if access[\u0027access_level\u0027] \u003d\u003d const.ACCESS_LEVEL_RW:"},{"line_number":511,"context_line":"                    all_users_rw.append(access[\u0027access_to\u0027])"},{"line_number":512,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_0b9c2f68","line":509,"range":{"start_line":506,"start_character":0,"end_line":509,"end_character":51},"updated":"2016-02-09 17:01:24.000000000","message":"Same here.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                                                 const.ACCESS_LEVEL_RO)"},{"line_number":504,"context_line":"            all_users \u003d all_users_ro + all_users_rw"},{"line_number":505,"context_line":"            for access in add_rules:"},{"line_number":506,"context_line":"                if access[\u0027access_to\u0027] in all_users:"},{"line_number":507,"context_line":"                    raise exception.ShareAccessExists("},{"line_number":508,"context_line":"                        access_type\u003daccess[\u0027access_type\u0027],"},{"line_number":509,"context_line":"                        access\u003daccess[\u0027access_to\u0027])"},{"line_number":510,"context_line":"                if access[\u0027access_level\u0027] \u003d\u003d const.ACCESS_LEVEL_RW:"},{"line_number":511,"context_line":"                    all_users_rw.append(access[\u0027access_to\u0027])"},{"line_number":512,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_cafe4705","line":509,"range":{"start_line":506,"start_character":0,"end_line":509,"end_character":51},"in_reply_to":"5a5ae5dd_0b9c2f68","updated":"2016-02-10 11:49:02.000000000","message":"Removed this code.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            for access in delete_rules:"},{"line_number":515,"context_line":"                # Access rule can be in error state, if so"},{"line_number":516,"context_line":"                # it can be absent in rules, hence - skip removal."},{"line_number":517,"context_line":"                if access[\u0027access_to\u0027] in all_users_rw:"},{"line_number":518,"context_line":"                    all_users_rw.remove(access[\u0027access_to\u0027])"},{"line_number":519,"context_line":"                if access[\u0027access_to\u0027] in all_users_ro:"},{"line_number":520,"context_line":"                    all_users_ro.remove(access[\u0027access_to\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_4b86a7ba","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":55},"updated":"2016-02-09 17:01:24.000000000","message":"Shouldn\u0027t you check if access[\u0027access_level\u0027] \u003d\u003d const.ACCESS_LEVEL_RW?","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            for access in delete_rules:"},{"line_number":515,"context_line":"                # Access rule can be in error state, if so"},{"line_number":516,"context_line":"                # it can be absent in rules, hence - skip removal."},{"line_number":517,"context_line":"                if access[\u0027access_to\u0027] in all_users_rw:"},{"line_number":518,"context_line":"                    all_users_rw.remove(access[\u0027access_to\u0027])"},{"line_number":519,"context_line":"                if access[\u0027access_to\u0027] in all_users_ro:"},{"line_number":520,"context_line":"                    all_users_ro.remove(access[\u0027access_to\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_ead46348","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":55},"in_reply_to":"5a5ae5dd_4b86a7ba","updated":"2016-02-10 11:49:02.000000000","message":"Removed this code.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                # it can be absent in rules, hence - skip removal."},{"line_number":517,"context_line":"                if access[\u0027access_to\u0027] in all_users_rw:"},{"line_number":518,"context_line":"                    all_users_rw.remove(access[\u0027access_to\u0027])"},{"line_number":519,"context_line":"                if access[\u0027access_to\u0027] in all_users_ro:"},{"line_number":520,"context_line":"                    all_users_ro.remove(access[\u0027access_to\u0027])"},{"line_number":521,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":522,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_6bb5a37c","line":519,"range":{"start_line":519,"start_character":16,"end_line":519,"end_character":55},"updated":"2016-02-09 17:01:24.000000000","message":"Shouldn\u0027t you check if access[\u0027access_level\u0027] \u003d\u003d const.ACCESS_LEVEL_RO?","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f9e0b0a54bcef63c0a91ff3b88d3327df6c6e769","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                # it can be absent in rules, hence - skip removal."},{"line_number":517,"context_line":"                if access[\u0027access_to\u0027] in all_users_rw:"},{"line_number":518,"context_line":"                    all_users_rw.remove(access[\u0027access_to\u0027])"},{"line_number":519,"context_line":"                if access[\u0027access_to\u0027] in all_users_ro:"},{"line_number":520,"context_line":"                    all_users_ro.remove(access[\u0027access_to\u0027])"},{"line_number":521,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":522,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_8ac92faf","line":519,"range":{"start_line":519,"start_character":16,"end_line":519,"end_character":55},"in_reply_to":"5a5ae5dd_6bb5a37c","updated":"2016-02-10 11:49:02.000000000","message":"Removed this code.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"f62851bf43804d996df4f1d0b0bb739aa0bdea63","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                all_users_rw.append(access[\u0027access_to\u0027])"},{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                all_users_ro.append(access[\u0027access_to\u0027])"},{"line_number":482,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":483,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _get_valid_users(self, server, share_name, access_level, force\u003dTrue):"},{"line_number":486,"context_line":"        param \u003d self._get_conf_param(access_level)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_c8c4e893","line":483,"range":{"start_line":482,"start_character":0,"end_line":483,"end_character":63},"updated":"2016-02-10 12:11:44.000000000","message":"This doesn\u0027t look right. Shouldn\u0027t you call _set_valid_users instead of _set_allow_hosts?","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3c89a574a7079c5919ae358fc26595b098a33fba","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                all_users_rw.append(access[\u0027access_to\u0027])"},{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                all_users_ro.append(access[\u0027access_to\u0027])"},{"line_number":482,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":483,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _get_valid_users(self, server, share_name, access_level, force\u003dTrue):"},{"line_number":486,"context_line":"        param \u003d self._get_conf_param(access_level)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_4888f822","line":483,"range":{"start_line":482,"start_character":0,"end_line":483,"end_character":63},"in_reply_to":"3a57f1b5_c8c4e893","updated":"2016-02-10 14:19:03.000000000","message":"Done","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"f62851bf43804d996df4f1d0b0bb739aa0bdea63","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":483,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _get_valid_users(self, server, share_name, access_level, force\u003dTrue):"},{"line_number":486,"context_line":"        param \u003d self._get_conf_param(access_level)"},{"line_number":487,"context_line":"        try:"},{"line_number":488,"context_line":"            (out, _) \u003d self._ssh_exec(server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_686374b2","line":485,"range":{"start_line":485,"start_character":4,"end_line":485,"end_character":77},"updated":"2016-02-10 12:11:44.000000000","message":"This method is not being used","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3c89a574a7079c5919ae358fc26595b098a33fba","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        self._set_allow_hosts(server, all_users_rw, share_name)"},{"line_number":483,"context_line":"        self._set_allow_hosts(server, all_users_ro, share_name)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _get_valid_users(self, server, share_name, access_level, force\u003dTrue):"},{"line_number":486,"context_line":"        param \u003d self._get_conf_param(access_level)"},{"line_number":487,"context_line":"        try:"},{"line_number":488,"context_line":"            (out, _) \u003d self._ssh_exec(server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_8876f03c","line":485,"range":{"start_line":485,"start_character":4,"end_line":485,"end_character":77},"in_reply_to":"3a57f1b5_686374b2","updated":"2016-02-10 14:19:03.000000000","message":"Done","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"f62851bf43804d996df4f1d0b0bb739aa0bdea63","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                raise"},{"line_number":495,"context_line":"            return []"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _get_conf_param(self, access_level):"},{"line_number":498,"context_line":"        if access_level \u003d\u003d const.ACCESS_LEVEL_RW:"},{"line_number":499,"context_line":"            return \u0027valid users\u0027"},{"line_number":500,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_a852ccdb","line":497,"range":{"start_line":497,"start_character":4,"end_line":497,"end_character":44},"updated":"2016-02-10 12:11:44.000000000","message":"This method is not being used","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3c89a574a7079c5919ae358fc26595b098a33fba","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                raise"},{"line_number":495,"context_line":"            return []"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _get_conf_param(self, access_level):"},{"line_number":498,"context_line":"        if access_level \u003d\u003d const.ACCESS_LEVEL_RW:"},{"line_number":499,"context_line":"            return \u0027valid users\u0027"},{"line_number":500,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_488f9823","line":497,"range":{"start_line":497,"start_character":4,"end_line":497,"end_character":44},"in_reply_to":"3a57f1b5_a852ccdb","updated":"2016-02-10 14:19:03.000000000","message":"Done","commit_id":"41cf13bde790c800cd5067489a892932aff75868"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"f1b0703f3d30dfae8ca86fbc719d29348d076192","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        This driver has two different behaviors according to parameters:"},{"line_number":138,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"},{"line_number":139,"context_line":"        \u0027add_rules\u0027 and \u0027delete_rules\u0027 are None. Previously existing access"},{"line_number":140,"context_line":"        rules are cleared and then added back according to \u0027access_rules\u0027."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        2. Adding/Deleting of several access rules - \u0027access_rules\u0027 contains"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_5b78a7f2","line":139,"range":{"start_line":139,"start_character":39,"end_line":139,"end_character":42},"updated":"2016-02-10 20:50:53.000000000","message":"I\u0027d update this to be \"shall be\". It makes it clear that the recovery case is only entered if both \u0027add_rules\u0027 and \u0027delete_rules\u0027 are None.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"f1b0703f3d30dfae8ca86fbc719d29348d076192","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":333,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":334,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":335,"context_line":"                reason \u003d _(\u0027Only IP access type allowed.\u0027)"},{"line_number":336,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":337,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":338,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_26491932","line":335,"range":{"start_line":335,"start_character":33,"end_line":335,"end_character":35},"updated":"2016-02-10 20:50:53.000000000","message":"You could say that this should remain \"ip\" because it matches the actual value of the access_type we\u0027re checking for, but it could work either way.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"632a5ed863e2ea7608e8a26bcb29c2c5b7509126","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":334,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":335,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":336,"context_line":"                reason \u003d _(\u0027Only IP access type allowed.\u0027)"},{"line_number":337,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":338,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":339,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_debc7b6e","line":336,"range":{"start_line":336,"start_character":33,"end_line":336,"end_character":35},"updated":"2016-02-10 22:48:10.000000000","message":"The wording was changed above, but not here.","commit_id":"cbffcbfad4608d974f5fb600cd789277f44d390c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"ac40094e61588da027d757043d5c5e67006f64c1","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":334,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":335,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":336,"context_line":"                reason \u003d _(\u0027Only IP access type allowed.\u0027)"},{"line_number":337,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":338,"context_line":"            if access_level !\u003d const.ACCESS_LEVEL_RW:"},{"line_number":339,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_cbc57b3c","line":336,"range":{"start_line":336,"start_character":33,"end_line":336,"end_character":35},"in_reply_to":"3a57f1b5_debc7b6e","updated":"2016-02-11 13:22:55.000000000","message":"Done","commit_id":"cbffcbfad4608d974f5fb600cd789277f44d390c"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def remove_export(self, server, share_name):"},{"line_number":119,"context_line":"        \"\"\"Remove export.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _check_valid_access(self, access_rules):"},{"line_number":122,"context_line":"        for access in access_rules:"},{"line_number":123,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":124,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_1a202d9b","line":121,"updated":"2016-02-19 11:21:13.000000000","message":"Probably _validate_access_rules would be a more descriptive name for this method. Also it seems to be shared between helpers so probably it could be moved to base class.","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f723ce8e06aaec158d4e64bbae41ae5f5c5567cc","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def remove_export(self, server, share_name):"},{"line_number":119,"context_line":"        \"\"\"Remove export.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _check_valid_access(self, access_rules):"},{"line_number":122,"context_line":"        for access in access_rules:"},{"line_number":123,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":124,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_1be2ec03","line":121,"in_reply_to":"bae84128_1a202d9b","updated":"2016-02-19 12:32:25.000000000","message":"Every helper has a different implementation of this method. Implementation of this method is not mandatory, so I decided to leave it internal of each subclass.","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":125,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":126,"context_line":"                reason \u003d _(\"Only \u0027ip\u0027 access type allowed.\")"},{"line_number":127,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":128,"context_line":"            if access_level not in ("},{"line_number":129,"context_line":"                    const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW):"},{"line_number":130,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_5aa3d59e","line":127,"updated":"2016-02-19 11:21:13.000000000","message":"Just curious, why not prune rules with a proper warning instead of raising an exception and dropping everything?","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f723ce8e06aaec158d4e64bbae41ae5f5c5567cc","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":125,"context_line":"            if access_type !\u003d \u0027ip\u0027:"},{"line_number":126,"context_line":"                reason \u003d _(\"Only \u0027ip\u0027 access type allowed.\")"},{"line_number":127,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":128,"context_line":"            if access_level not in ("},{"line_number":129,"context_line":"                    const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW):"},{"line_number":130,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_005d5be9","line":127,"in_reply_to":"bae84128_5aa3d59e","updated":"2016-02-19 12:32:25.000000000","message":"Because this rule with invalid type has already been added to DB at this point. So this request must fail so its status is changed to error and user cleans it up.","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    @nfs_synchronized"},{"line_number":133,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":134,"context_line":"                      delete_rules\u003dNone):"},{"line_number":135,"context_line":"        \"\"\"Update access rules for given share."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        This driver has two different behaviors according to parameters:"},{"line_number":138,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_d5b5f6d0","line":135,"updated":"2016-02-19 11:21:13.000000000","message":"Probably NASHelperBase.update_access is a better place for long and solid docstring. From what I can see docstrings in three drivers don\u0027t differ much so probably it is better to highlight only driver-specific features in each driver and  keep the general description in NASHelperBase.","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027smbcontrol\u0027, \u0027all\u0027, \u0027close-share\u0027,"},{"line_number":329,"context_line":"                                    share_name])"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _check_valid_access(self, access_rules):"},{"line_number":332,"context_line":"        for access in access_rules:"},{"line_number":333,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":334,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_b5e152d3","line":331,"updated":"2016-02-19 11:21:13.000000000","message":"ditto","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":342,"context_line":"                      delete_rules\u003dNone):"},{"line_number":343,"context_line":"        \"\"\"Update access rules for given share."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        This driver has two different behaviors according to parameters:"},{"line_number":346,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_871a256d","line":343,"updated":"2016-02-19 11:21:13.000000000","message":"ditto","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"18a00e6a3e8eca8b378ef9081e015bb2a2d2e69c","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                not apply for this protocol."},{"line_number":362,"context_line":"        :param delete_rules: None or List of access rules which should be"},{"line_number":363,"context_line":"               removed. access_rules doesn\u0027t contain these rules. This"},{"line_number":364,"context_line":"               parameter does not apply for this protocol."},{"line_number":365,"context_line":"        \"\"\""},{"line_number":366,"context_line":"        hosts \u003d []"},{"line_number":367,"context_line":"        self._check_valid_access(access_rules)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_20b4dff0","line":364,"updated":"2016-02-19 12:04:47.000000000","message":"Does it mean that it is impossible to remove access to share for a given host?","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f723ce8e06aaec158d4e64bbae41ae5f5c5567cc","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                not apply for this protocol."},{"line_number":362,"context_line":"        :param delete_rules: None or List of access rules which should be"},{"line_number":363,"context_line":"               removed. access_rules doesn\u0027t contain these rules. This"},{"line_number":364,"context_line":"               parameter does not apply for this protocol."},{"line_number":365,"context_line":"        \"\"\""},{"line_number":366,"context_line":"        hosts \u003d []"},{"line_number":367,"context_line":"        self._check_valid_access(access_rules)"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_c016d3a6","line":364,"in_reply_to":"bae84128_20b4dff0","updated":"2016-02-19 12:32:25.000000000","message":"No, it means this method always works in \"recovery mode\". Since the access rules in backend in this case are just a string, and \"access_rules\" variable contains all access rules that should be present, then only it is used, by just setting this string according to the rules present in \"access_rules\".","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":445,"context_line":"            \u0027read only\u0027: \u0027no\u0027,"},{"line_number":446,"context_line":"        }"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _check_valid_access(self, access_rules):"},{"line_number":449,"context_line":"        for access in access_rules:"},{"line_number":450,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":451,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_0f83d1cd","line":448,"updated":"2016-02-19 11:21:13.000000000","message":"ditto","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"5b978c3d0b7a9f5a1679691107b1a4dcee1bcc89","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def update_access(self, server, share_name, access_rules, add_rules\u003dNone,"},{"line_number":460,"context_line":"                      delete_rules\u003dNone):"},{"line_number":461,"context_line":"        \"\"\"Update access rules for given share."},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        This driver has two different behaviors according to parameters:"},{"line_number":464,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_072575aa","line":461,"updated":"2016-02-19 11:21:13.000000000","message":"ditto","commit_id":"e043520099145a96d5ded757f1c5ab64386dc325"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"398c1605dc4c85a04098980c0964c488fde70132","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def remove_export(self, server, share_name):"},{"line_number":139,"context_line":"        \"\"\"Remove export.\"\"\""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _validate_access_rules(self, access_rules):"},{"line_number":142,"context_line":"        for access in access_rules:"},{"line_number":143,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":144,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_6c7c2021","line":141,"updated":"2016-02-19 13:21:20.000000000","message":"Continuing the line from PS24. They are different indeed, but apparently the only things which differ are access_type and a list of allowed access levels. These could be defined in subclass or passed as arguments. I\u0027d have stuck with the first approach. I am not insisting on this change, but I believe that in the end it will make code cleaner and easier to comprehend.","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"046ea4b58b6c346e9f5f8ae11d0bad7b83eb7c0f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    def remove_export(self, server, share_name):"},{"line_number":139,"context_line":"        \"\"\"Remove export.\"\"\""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _validate_access_rules(self, access_rules):"},{"line_number":142,"context_line":"        for access in access_rules:"},{"line_number":143,"context_line":"            access_type \u003d access[\u0027access_type\u0027]"},{"line_number":144,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_8c899dcd","line":141,"in_reply_to":"bae84128_6c7c2021","updated":"2016-02-19 15:12:18.000000000","message":"Done","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"398c1605dc4c85a04098980c0964c488fde70132","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        # Adding/Deleting specific rules"},{"line_number":179,"context_line":"        else:"},{"line_number":180,"context_line":"            self._validate_access_rules(add_rules)"},{"line_number":181,"context_line":"            for access in add_rules:"},{"line_number":182,"context_line":"                access_to, access_type \u003d (access[\u0027access_to\u0027],"},{"line_number":183,"context_line":"                                          access[\u0027access_type\u0027])"},{"line_number":184,"context_line":"                found_item \u003d re.search("}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_4cd83cf0","line":181,"updated":"2016-02-19 13:21:20.000000000","message":"This could be done like follows:\nfor access in (add_rules or []):","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"046ea4b58b6c346e9f5f8ae11d0bad7b83eb7c0f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        # Adding/Deleting specific rules"},{"line_number":179,"context_line":"        else:"},{"line_number":180,"context_line":"            self._validate_access_rules(add_rules)"},{"line_number":181,"context_line":"            for access in add_rules:"},{"line_number":182,"context_line":"                access_to, access_type \u003d (access[\u0027access_to\u0027],"},{"line_number":183,"context_line":"                                          access[\u0027access_type\u0027])"},{"line_number":184,"context_line":"                found_item \u003d re.search("}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_4c9f9503","line":181,"in_reply_to":"bae84128_4cd83cf0","updated":"2016-02-19 15:12:18.000000000","message":"Done","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"},{"author":{"_account_id":8056,"name":"Ramana Raja","email":"rraja@redhat.com","username":"Ram_Raja"},"change_message_id":"e387aef350b61773a2cd44c9b4d20783cdabb9af","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_af023e6d","line":99,"updated":"2016-02-22 13:01:15.000000000","message":"Can this not be a static method?","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"dfb4ac924aec412da026e70d17aba28e8f33da9a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_79c24786","line":99,"in_reply_to":"bae84128_0b7fb715","updated":"2016-02-24 11:54:11.000000000","message":"Is it ok if added @staticmethod decorator?","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9a31711cca3288d90051bf9b7ce05b32aac138ed","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_e77a1b76","line":99,"in_reply_to":"bae84128_1a116604","updated":"2016-02-24 17:08:54.000000000","message":"Done","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":8056,"name":"Ramana Raja","email":"rraja@redhat.com","username":"Ram_Raja"},"change_message_id":"9a790a942d5d42438666e40ac3f9ad8efce8e7e1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_1a116604","line":99,"in_reply_to":"bae84128_79c24786","updated":"2016-02-24 13:39:24.000000000","message":"Yes, and of course the method would\u0027ve to lose the \u0027self\u0027 parameter. Please see line 79 for reference.\nhttps://docs.python.org/2/library/functions.html#staticmethod","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2e0ed7caf28561d275ed0f543610c0693c9422b6","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_c3cf8f7d","line":99,"in_reply_to":"bae84128_86e12001","updated":"2016-02-22 18:00:09.000000000","message":"My intention of not implementing as a static method is that another helper may override this implementation if needed.","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":8056,"name":"Ramana Raja","email":"rraja@redhat.com","username":"Ram_Raja"},"change_message_id":"f9a8fd5b5f588b0fd2d15747f15f4ef2faa8220b","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_86e12001","line":99,"in_reply_to":"bae84128_af023e6d","updated":"2016-02-22 14:25:30.000000000","message":"Or maybe even just a regular function not defined within a class?","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":8056,"name":"Ramana Raja","email":"rraja@redhat.com","username":"Ram_Raja"},"change_message_id":"94066264db217983d3452a0fe9605833a287e96d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def restore_access_after_maintenance(self, server, share_name):"},{"line_number":97,"context_line":"        \"\"\"Enables access to share after maintenance operations were done.\"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def validate_access_rules(self, access_rules, allowed_types,"},{"line_number":100,"context_line":"                              allowed_levels):"},{"line_number":101,"context_line":"        \"\"\"Validates access rules according to access_type and access_level."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_0b7fb715","line":99,"in_reply_to":"bae84128_c3cf8f7d","updated":"2016-02-23 05:09:25.000000000","message":"Static methods can be overriden in Python.","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":8056,"name":"Ramana Raja","email":"rraja@redhat.com","username":"Ram_Raja"},"change_message_id":"e387aef350b61773a2cd44c9b4d20783cdabb9af","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        else:"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"            self.validate_access_rules("},{"line_number":190,"context_line":"                add_rules, (\u0027ip\u0027,),"},{"line_number":191,"context_line":"                (const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"            for access in (add_rules or []):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_4fc61249","line":190,"updated":"2016-02-22 13:01:15.000000000","message":"Is it not necessary to validate delete_rules?","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2e0ed7caf28561d275ed0f543610c0693c9422b6","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        else:"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"            self.validate_access_rules("},{"line_number":190,"context_line":"                add_rules, (\u0027ip\u0027,),"},{"line_number":191,"context_line":"                (const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"            for access in (add_rules or []):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bae84128_46a26daf","line":190,"in_reply_to":"bae84128_4fc61249","updated":"2016-02-22 18:00:09.000000000","message":"in specific case of NFS, no. The \"export -u\" does not throw errors. I tested \"sudo exportfs -u foo:/bar\". But there is the possible edge case where a tenant adds a rule with IP value but user type. When removing the incorrect rule, it may remove a valid rule with the same IP value. Very nice catch Raja.","commit_id":"ffe00d5f19bebe95f8c921582bdf238ca022169c"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"a7da7f3931d1d5aad04b165249d1611ad844274a","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                    self.validate_access_rules("},{"line_number":215,"context_line":"                        [access], (\u0027ip\u0027,),"},{"line_number":216,"context_line":"                        (const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW))"},{"line_number":217,"context_line":"                except (exception.InvalidShareAccess,"},{"line_number":218,"context_line":"                        exception.InvalidShareAccessLevel):"},{"line_number":219,"context_line":"                    LOG.warning(_LW("},{"line_number":220,"context_line":"                        \"Unsupported access level %(level)s or access type \""},{"line_number":221,"context_line":"                        \"%(type)s, skipping removal of access rule to \""}],"source_content_type":"text/x-python","patch_set":29,"id":"bae84128_aa01733a","line":218,"range":{"start_line":217,"start_character":24,"end_line":218,"end_character":57},"updated":"2016-02-22 21:58:27.000000000","message":"So the theory behind swallowing these exceptions is that such an invalid rule could never have been added in the first place?","commit_id":"8a6c3a75a6465b075174c8ea6fa6250049b8b695"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"6c199b45c8e475c723c7b598b9e2a7b99bbf31f2","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                    self.validate_access_rules("},{"line_number":215,"context_line":"                        [access], (\u0027ip\u0027,),"},{"line_number":216,"context_line":"                        (const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW))"},{"line_number":217,"context_line":"                except (exception.InvalidShareAccess,"},{"line_number":218,"context_line":"                        exception.InvalidShareAccessLevel):"},{"line_number":219,"context_line":"                    LOG.warning(_LW("},{"line_number":220,"context_line":"                        \"Unsupported access level %(level)s or access type \""},{"line_number":221,"context_line":"                        \"%(type)s, skipping removal of access rule to \""}],"source_content_type":"text/x-python","patch_set":29,"id":"bae84128_eb609a03","line":218,"range":{"start_line":217,"start_character":24,"end_line":218,"end_character":57},"in_reply_to":"bae84128_aa01733a","updated":"2016-02-23 00:52:30.000000000","message":"These rules are never added in fact. When invoked from access-allow API call, they reach driver\u0027s update_access and validation throws exception, but they are already in DB with ERROR status. API call access-deny will invoke the driver\u0027s update_access, reach this code, and if the rule does not pass validation here, it is for sure a rule in ERROR status, so it should not be \"removed\" because it was never added. Just skipped so method can finish and rule removed from DB.","commit_id":"8a6c3a75a6465b075174c8ea6fa6250049b8b695"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":110,"context_line":"            if access_type not in allowed_types:"},{"line_number":111,"context_line":"                reason \u003d _(\"Only %s access type allowed.\") % ("},{"line_number":112,"context_line":"                    \u0027, \u0027.join(tuple([\"\u0027%s\u0027\" % x for x in allowed_types])))"},{"line_number":113,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":114,"context_line":"            if access_level not in allowed_levels:"},{"line_number":115,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_bb792b32","line":112,"range":{"start_line":112,"start_character":25,"end_line":112,"end_character":74},"updated":"2016-02-26 05:38:31.000000000","message":"join(allowed_types) seems to work w/o all that extra stuff.  Right?","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            access_level \u003d access[\u0027access_level\u0027]"},{"line_number":110,"context_line":"            if access_type not in allowed_types:"},{"line_number":111,"context_line":"                reason \u003d _(\"Only %s access type allowed.\") % ("},{"line_number":112,"context_line":"                    \u0027, \u0027.join(tuple([\"\u0027%s\u0027\" % x for x in allowed_types])))"},{"line_number":113,"context_line":"                raise exception.InvalidShareAccess(reason\u003dreason)"},{"line_number":114,"context_line":"            if access_level not in allowed_levels:"},{"line_number":115,"context_line":"                raise exception.InvalidShareAccessLevel(level\u003daccess_level)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_d9e8607f","line":112,"range":{"start_line":112,"start_character":25,"end_line":112,"end_character":74},"in_reply_to":"9aed3d3a_bb792b32","updated":"2016-02-26 20:50:16.000000000","message":"my intention is to print:\nOnly \u0027ip\u0027, \u0027user\u0027 access type allowed.\n\nusing join(allowed_types) it prints:\nOnly \u0027ip, user\u0027 access type allowed.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":176,"context_line":"            for host in hosts:"},{"line_number":177,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":178,"context_line":"                                        \u0027:\u0027.join([host, local_path])])"},{"line_number":179,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":180,"context_line":"            for access in access_rules:"},{"line_number":181,"context_line":"                self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_5b045f7d","line":178,"range":{"start_line":178,"start_character":49,"end_line":178,"end_character":50},"updated":"2016-02-26 05:38:31.000000000","message":"tuple instead of list is better here","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":176,"context_line":"            for host in hosts:"},{"line_number":177,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":178,"context_line":"                                        \u0027:\u0027.join([host, local_path])])"},{"line_number":179,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":180,"context_line":"            for access in access_rules:"},{"line_number":181,"context_line":"                self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_b9491c8e","line":178,"range":{"start_line":178,"start_character":49,"end_line":178,"end_character":50},"in_reply_to":"9aed3d3a_5b045f7d","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                    server,"},{"line_number":183,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":184,"context_line":"                     \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":185,"context_line":"                     \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":186,"context_line":"        # Adding/Deleting specific rules"},{"line_number":187,"context_line":"        else:"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_7b3a0338","line":185,"range":{"start_line":185,"start_character":30,"end_line":185,"end_character":31},"updated":"2016-02-26 05:38:31.000000000","message":"tuple instead of list is better here","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                    server,"},{"line_number":183,"context_line":"                    [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":184,"context_line":"                     \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":185,"context_line":"                     \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":186,"context_line":"        # Adding/Deleting specific rules"},{"line_number":187,"context_line":"        else:"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_195f6842","line":185,"range":{"start_line":185,"start_character":30,"end_line":185,"end_character":31},"in_reply_to":"9aed3d3a_7b3a0338","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                    re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to),"},{"line_number":198,"context_line":"                    out)"},{"line_number":199,"context_line":"                if found_item is not None:"},{"line_number":200,"context_line":"                    LOG.warning(_LW(\"Access rule %(type)s:%(to)s already \""},{"line_number":201,"context_line":"                                    \"exists for share %(path)s\") % {"},{"line_number":202,"context_line":"                        \u0027to\u0027: access_to,"},{"line_number":203,"context_line":"                        \u0027type\u0027: access_type,"},{"line_number":204,"context_line":"                        \u0027path\u0027: share_name"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_1e5645d2","line":201,"range":{"start_line":200,"start_character":9,"end_line":201,"end_character":68},"updated":"2016-02-26 05:38:31.000000000","message":"If the already existing rule has the wrong access level then this would not catch that. I\u0027d at least do deletes before adds (presuming e.g. the RW rule must be deleted before a RO rule can be added for the same thing).","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                    re.escape(local_path) + \u0027[\\s\\n]*\u0027 + re.escape(access_to),"},{"line_number":198,"context_line":"                    out)"},{"line_number":199,"context_line":"                if found_item is not None:"},{"line_number":200,"context_line":"                    LOG.warning(_LW(\"Access rule %(type)s:%(to)s already \""},{"line_number":201,"context_line":"                                    \"exists for share %(path)s\") % {"},{"line_number":202,"context_line":"                        \u0027to\u0027: access_to,"},{"line_number":203,"context_line":"                        \u0027type\u0027: access_type,"},{"line_number":204,"context_line":"                        \u0027path\u0027: share_name"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_cc8380cb","line":201,"range":{"start_line":200,"start_character":9,"end_line":201,"end_character":68},"in_reply_to":"9aed3d3a_1e5645d2","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                                    \"exists for share %(path)s\") % {"},{"line_number":202,"context_line":"                        \u0027to\u0027: access_to,"},{"line_number":203,"context_line":"                        \u0027type\u0027: access_type,"},{"line_number":204,"context_line":"                        \u0027path\u0027: share_name"},{"line_number":205,"context_line":"                    })"},{"line_number":206,"context_line":"                else:"},{"line_number":207,"context_line":"                    self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_5ee9ed19","line":204,"range":{"start_line":204,"start_character":25,"end_line":204,"end_character":29},"updated":"2016-02-26 05:38:31.000000000","message":"rename path. it is share name not path.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                                    \"exists for share %(path)s\") % {"},{"line_number":202,"context_line":"                        \u0027to\u0027: access_to,"},{"line_number":203,"context_line":"                        \u0027type\u0027: access_type,"},{"line_number":204,"context_line":"                        \u0027path\u0027: share_name"},{"line_number":205,"context_line":"                    })"},{"line_number":206,"context_line":"                else:"},{"line_number":207,"context_line":"                    self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_4c77703a","line":204,"range":{"start_line":204,"start_character":25,"end_line":204,"end_character":29},"in_reply_to":"9aed3d3a_5ee9ed19","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        server,"},{"line_number":209,"context_line":"                        [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":210,"context_line":"                         \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":211,"context_line":"                         \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":212,"context_line":"            for access in (delete_rules or []):"},{"line_number":213,"context_line":"                try:"},{"line_number":214,"context_line":"                    self.validate_access_rules("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_1ec5a53b","line":211,"range":{"start_line":211,"start_character":34,"end_line":211,"end_character":35},"updated":"2016-02-26 05:38:31.000000000","message":"can be tuple","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        server,"},{"line_number":209,"context_line":"                        [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":210,"context_line":"                         \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":211,"context_line":"                         \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":212,"context_line":"            for access in (delete_rules or []):"},{"line_number":213,"context_line":"                try:"},{"line_number":214,"context_line":"                    self.validate_access_rules("}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_ac9efc53","line":211,"range":{"start_line":211,"start_character":34,"end_line":211,"end_character":35},"in_reply_to":"9aed3d3a_1ec5a53b","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                                      \u0027to\u0027: access[\u0027access_to\u0027]})"},{"line_number":225,"context_line":"                    continue"},{"line_number":226,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":227,"context_line":"                               \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":228,"context_line":"        self._sync_nfs_temp_and_perm_files(server)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def _get_host_list(self, output, local_path):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_5e128db5","line":227,"range":{"start_line":227,"start_character":40,"end_line":227,"end_character":41},"updated":"2016-02-26 05:38:31.000000000","message":"tuple","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                                      \u0027to\u0027: access[\u0027access_to\u0027]})"},{"line_number":225,"context_line":"                    continue"},{"line_number":226,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":227,"context_line":"                               \u0027:\u0027.join([access[\u0027access_to\u0027], local_path])])"},{"line_number":228,"context_line":"        self._sync_nfs_temp_and_perm_files(server)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def _get_host_list(self, output, local_path):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_ccb0a0e0","line":227,"range":{"start_line":227,"start_character":40,"end_line":227,"end_character":41},"in_reply_to":"9aed3d3a_5e128db5","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            except Exception as child_e:"},{"line_number":326,"context_line":"                # If we get here, then it will be useful"},{"line_number":327,"context_line":"                # to log parent exception too."},{"line_number":328,"context_line":"                error \u003d six.text_type(child_e)"},{"line_number":329,"context_line":"                LOG.exception(error)"},{"line_number":330,"context_line":"                LOG.error(parent_e)"},{"line_number":331,"context_line":"                raise exception.ManilaException(reason\u003derror)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_de5e9d44","line":328,"range":{"start_line":328,"start_character":24,"end_line":328,"end_character":37},"updated":"2016-02-26 05:38:31.000000000","message":"I\u0027ll recommend not using six.text_type here.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            except Exception as child_e:"},{"line_number":326,"context_line":"                # If we get here, then it will be useful"},{"line_number":327,"context_line":"                # to log parent exception too."},{"line_number":328,"context_line":"                error \u003d six.text_type(child_e)"},{"line_number":329,"context_line":"                LOG.exception(error)"},{"line_number":330,"context_line":"                LOG.error(parent_e)"},{"line_number":331,"context_line":"                raise exception.ManilaException(reason\u003derror)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_401e1164","line":328,"range":{"start_line":328,"start_character":24,"end_line":328,"end_character":37},"in_reply_to":"9aed3d3a_de5e9d44","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7a3dbc54076f1909bc6903382cfd57faebf91fe5","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                # If we get here, then it will be useful"},{"line_number":327,"context_line":"                # to log parent exception too."},{"line_number":328,"context_line":"                error \u003d six.text_type(child_e)"},{"line_number":329,"context_line":"                LOG.exception(error)"},{"line_number":330,"context_line":"                LOG.error(parent_e)"},{"line_number":331,"context_line":"                raise exception.ManilaException(reason\u003derror)"},{"line_number":332,"context_line":"        else:"},{"line_number":333,"context_line":"            # Share exists"},{"line_number":334,"context_line":"            if recreate:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_be091934","line":331,"range":{"start_line":329,"start_character":16,"end_line":331,"end_character":61},"updated":"2016-02-26 05:38:31.000000000","message":"The text from Exception is not necessarily at all meaningful by itself. You should add some context around it or you may get some useless messages.  Then you\u0027ll also need i18n wrappers for your text.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                # If we get here, then it will be useful"},{"line_number":327,"context_line":"                # to log parent exception too."},{"line_number":328,"context_line":"                error \u003d six.text_type(child_e)"},{"line_number":329,"context_line":"                LOG.exception(error)"},{"line_number":330,"context_line":"                LOG.error(parent_e)"},{"line_number":331,"context_line":"                raise exception.ManilaException(reason\u003derror)"},{"line_number":332,"context_line":"        else:"},{"line_number":333,"context_line":"            # Share exists"},{"line_number":334,"context_line":"            if recreate:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_e5093733","line":331,"range":{"start_line":329,"start_character":16,"end_line":331,"end_character":61},"in_reply_to":"9aed3d3a_be091934","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"47117886044f7868101435fbbd6525a559ea616d","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":175,"context_line":"            for host in hosts:"},{"line_number":176,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":177,"context_line":"                                        \u0027:\u0027.join((host, local_path))])"},{"line_number":178,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":179,"context_line":"            for access in access_rules:"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_a789ce28","line":176,"range":{"start_line":176,"start_character":41,"end_line":176,"end_character":45},"updated":"2016-02-27 04:20:42.000000000","message":"Replace sudo with rootwrap. This patch or follow-up? See:\nhttps://review.openstack.org/#/c/285107/2/manila/share/drivers/lvm.py","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bd5bc038d6290a2acd73dfea84810f0ff381a920","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":175,"context_line":"            for host in hosts:"},{"line_number":176,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":177,"context_line":"                                        \u0027:\u0027.join((host, local_path))])"},{"line_number":178,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":179,"context_line":"            for access in access_rules:"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_2b5f400f","line":176,"range":{"start_line":176,"start_character":41,"end_line":176,"end_character":45},"in_reply_to":"9aed3d3a_a789ce28","updated":"2016-02-27 14:42:49.000000000","message":"It is already implemented. Please see: https://review.openstack.org/#/c/256281/33/manila/share/drivers/lvm.py","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"47117886044f7868101435fbbd6525a559ea616d","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self._ssh_exec(server, sync_cmd)"},{"line_number":253,"context_line":"        self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-a\u0027])"},{"line_number":254,"context_line":"        out, _ \u003d self._ssh_exec("},{"line_number":255,"context_line":"            server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027status\u0027],"},{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_c7869212","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":26},"updated":"2016-02-27 04:20:42.000000000","message":"here too","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bd5bc038d6290a2acd73dfea84810f0ff381a920","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self._ssh_exec(server, sync_cmd)"},{"line_number":253,"context_line":"        self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-a\u0027])"},{"line_number":254,"context_line":"        out, _ \u003d self._ssh_exec("},{"line_number":255,"context_line":"            server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027status\u0027],"},{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_6b9f88b4","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":26},"in_reply_to":"9aed3d3a_c7869212","updated":"2016-02-27 14:42:49.000000000","message":"Same as above.","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"47117886044f7868101435fbbd6525a559ea616d","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("},{"line_number":259,"context_line":"                server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027restart\u0027])"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def get_exports_for_share(self, server, old_export_location):"},{"line_number":262,"context_line":"        self._verify_server_has_public_address(server)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_277e5e19","line":259,"range":{"start_line":259,"start_character":26,"end_line":259,"end_character":30},"updated":"2016-02-27 04:20:42.000000000","message":"and here","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bd5bc038d6290a2acd73dfea84810f0ff381a920","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("},{"line_number":259,"context_line":"                server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027restart\u0027])"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def get_exports_for_share(self, server, old_export_location):"},{"line_number":262,"context_line":"        self._verify_server_has_public_address(server)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_cba6940f","line":259,"range":{"start_line":259,"start_character":26,"end_line":259,"end_character":30},"in_reply_to":"9aed3d3a_277e5e19","updated":"2016-02-27 14:42:49.000000000","message":"Same as above.","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"47117886044f7868101435fbbd6525a559ea616d","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            # Share exists"},{"line_number":341,"context_line":"            if recreate:"},{"line_number":342,"context_line":"                self._ssh_exec("},{"line_number":343,"context_line":"                    server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027, \u0027delshare\u0027, share_name, ])"},{"line_number":344,"context_line":"                try:"},{"line_number":345,"context_line":"                    self._ssh_exec(server, create_cmd)"},{"line_number":346,"context_line":"                except Exception as e:"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_a790ae44","line":343,"range":{"start_line":343,"start_character":30,"end_line":343,"end_character":34},"updated":"2016-02-27 04:20:42.000000000","message":"and here","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bd5bc038d6290a2acd73dfea84810f0ff381a920","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            # Share exists"},{"line_number":341,"context_line":"            if recreate:"},{"line_number":342,"context_line":"                self._ssh_exec("},{"line_number":343,"context_line":"                    server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027, \u0027delshare\u0027, share_name, ])"},{"line_number":344,"context_line":"                try:"},{"line_number":345,"context_line":"                    self._ssh_exec(server, create_cmd)"},{"line_number":346,"context_line":"                except Exception as e:"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_aba990e1","line":343,"range":{"start_line":343,"start_character":30,"end_line":343,"end_character":34},"in_reply_to":"9aed3d3a_a790ae44","updated":"2016-02-27 14:42:49.000000000","message":"Same as above.","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"47117886044f7868101435fbbd6525a559ea616d","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                raise exception.ShareBackendException(msg\u003dmsg)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        for param, value in self.parameters.items():"},{"line_number":356,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027, \u0027setparm\u0027,"},{"line_number":357,"context_line":"                           share_name, param, value])"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return self.export_format % (server[\u0027public_address\u0027], share_name)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_67afc681","line":356,"range":{"start_line":356,"start_character":37,"end_line":356,"end_character":41},"updated":"2016-02-27 04:20:42.000000000","message":"I see a bunch outside of this patch. Better to do it in a follow-up patch.","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bd5bc038d6290a2acd73dfea84810f0ff381a920","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                raise exception.ShareBackendException(msg\u003dmsg)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        for param, value in self.parameters.items():"},{"line_number":356,"context_line":"            self._ssh_exec(server, [\u0027sudo\u0027, \u0027net\u0027, \u0027conf\u0027, \u0027setparm\u0027,"},{"line_number":357,"context_line":"                           share_name, param, value])"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return self.export_format % (server[\u0027public_address\u0027], share_name)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aed3d3a_0bb19c47","line":356,"range":{"start_line":356,"start_character":37,"end_line":356,"end_character":41},"in_reply_to":"9aed3d3a_67afc681","updated":"2016-02-27 14:42:49.000000000","message":"Same as above.","commit_id":"f15be83055640a99c07a677088dfacf84d8e224c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7786152aad8aabb6f37bb525508d696dd7c3d006","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":175,"context_line":"            for host in hosts:"},{"line_number":176,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":177,"context_line":"                                        \u0027:\u0027.join((host, local_path))])"},{"line_number":178,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":179,"context_line":"            for access in access_rules:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_b3cf357e","line":176,"range":{"start_line":176,"start_character":41,"end_line":176,"end_character":45},"updated":"2016-02-28 22:43:12.000000000","message":"is this sudo removed in another patch?","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5e55d6de8fb4615e080acb0f7c6b25bc7f898171","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            hosts \u003d self._get_host_list(out, local_path)"},{"line_number":175,"context_line":"            for host in hosts:"},{"line_number":176,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":177,"context_line":"                                        \u0027:\u0027.join((host, local_path))])"},{"line_number":178,"context_line":"            self._sync_nfs_temp_and_perm_files(server)"},{"line_number":179,"context_line":"            for access in access_rules:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_af3ce9c8","line":176,"range":{"start_line":176,"start_character":41,"end_line":176,"end_character":45},"in_reply_to":"9aed3d3a_b3cf357e","updated":"2016-02-28 23:30:26.000000000","message":"Hi Mark. These sudos must not be removed at this moment. They must be here to trigger the rootwrap helper. Please see https://review.openstack.org/#/c/256281/33/manila/share/drivers/lvm.py\n\nAlso, Ben is possibly working on changing the executor, so the LVM driver does not have to SSH. This change will possibly remove sudo from here, or still employ the rootwrap workaround.","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7786152aad8aabb6f37bb525508d696dd7c3d006","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                                      \u0027type\u0027: access[\u0027access_type\u0027],"},{"line_number":205,"context_line":"                                      \u0027to\u0027: access[\u0027access_to\u0027]})"},{"line_number":206,"context_line":"                    continue"},{"line_number":207,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":208,"context_line":"                               \u0027:\u0027.join((access[\u0027access_to\u0027], local_path))])"},{"line_number":209,"context_line":"            if delete_rules:"},{"line_number":210,"context_line":"                self._sync_nfs_temp_and_perm_files(server)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_93caf16c","line":207,"range":{"start_line":207,"start_character":41,"end_line":207,"end_character":45},"updated":"2016-02-28 22:43:12.000000000","message":"same","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5e55d6de8fb4615e080acb0f7c6b25bc7f898171","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                                      \u0027type\u0027: access[\u0027access_type\u0027],"},{"line_number":205,"context_line":"                                      \u0027to\u0027: access[\u0027access_to\u0027]})"},{"line_number":206,"context_line":"                    continue"},{"line_number":207,"context_line":"                self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-u\u0027,"},{"line_number":208,"context_line":"                               \u0027:\u0027.join((access[\u0027access_to\u0027], local_path))])"},{"line_number":209,"context_line":"            if delete_rules:"},{"line_number":210,"context_line":"                self._sync_nfs_temp_and_perm_files(server)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_ef3271f1","line":207,"range":{"start_line":207,"start_character":41,"end_line":207,"end_character":45},"in_reply_to":"9aed3d3a_93caf16c","updated":"2016-02-28 23:30:26.000000000","message":"please see comment above.","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7786152aad8aabb6f37bb525508d696dd7c3d006","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                else:"},{"line_number":225,"context_line":"                    self._ssh_exec("},{"line_number":226,"context_line":"                        server,"},{"line_number":227,"context_line":"                        [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":228,"context_line":"                         \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":229,"context_line":"                         \u0027:\u0027.join((access[\u0027access_to\u0027], local_path))])"},{"line_number":230,"context_line":"            if add_rules:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_d3c47960","line":227,"range":{"start_line":227,"start_character":26,"end_line":227,"end_character":30},"updated":"2016-02-28 22:43:12.000000000","message":"same","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5e55d6de8fb4615e080acb0f7c6b25bc7f898171","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                else:"},{"line_number":225,"context_line":"                    self._ssh_exec("},{"line_number":226,"context_line":"                        server,"},{"line_number":227,"context_line":"                        [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-o\u0027,"},{"line_number":228,"context_line":"                         \u0027%s,no_subtree_check\u0027 % access[\u0027access_level\u0027],"},{"line_number":229,"context_line":"                         \u0027:\u0027.join((access[\u0027access_to\u0027], local_path))])"},{"line_number":230,"context_line":"            if add_rules:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_cf2fad86","line":227,"range":{"start_line":227,"start_character":26,"end_line":227,"end_character":30},"in_reply_to":"9aed3d3a_d3c47960","updated":"2016-02-28 23:30:26.000000000","message":"please see comment above.","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7786152aad8aabb6f37bb525508d696dd7c3d006","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self._ssh_exec(server, sync_cmd)"},{"line_number":253,"context_line":"        self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-a\u0027])"},{"line_number":254,"context_line":"        out, _ \u003d self._ssh_exec("},{"line_number":255,"context_line":"            server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027status\u0027],"},{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_73ac8da0","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":26},"updated":"2016-02-28 22:43:12.000000000","message":"same","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5e55d6de8fb4615e080acb0f7c6b25bc7f898171","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self._ssh_exec(server, sync_cmd)"},{"line_number":253,"context_line":"        self._ssh_exec(server, [\u0027sudo\u0027, \u0027exportfs\u0027, \u0027-a\u0027])"},{"line_number":254,"context_line":"        out, _ \u003d self._ssh_exec("},{"line_number":255,"context_line":"            server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027status\u0027],"},{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_0f54f5fc","line":255,"range":{"start_line":255,"start_character":22,"end_line":255,"end_character":26},"in_reply_to":"9aed3d3a_73ac8da0","updated":"2016-02-28 23:30:26.000000000","message":"please see comment above.","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"7786152aad8aabb6f37bb525508d696dd7c3d006","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("},{"line_number":259,"context_line":"                server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027restart\u0027])"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def get_exports_for_share(self, server, old_export_location):"},{"line_number":262,"context_line":"        self._verify_server_has_public_address(server)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_53afc993","line":259,"range":{"start_line":259,"start_character":26,"end_line":259,"end_character":30},"updated":"2016-02-28 22:43:12.000000000","message":"same","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5e55d6de8fb4615e080acb0f7c6b25bc7f898171","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            check_exit_code\u003dFalse)"},{"line_number":257,"context_line":"        if \"not\" in out:"},{"line_number":258,"context_line":"            self._ssh_exec("},{"line_number":259,"context_line":"                server, [\u0027sudo\u0027, \u0027service\u0027, \u0027nfs-kernel-server\u0027, \u0027restart\u0027])"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def get_exports_for_share(self, server, old_export_location):"},{"line_number":262,"context_line":"        self._verify_server_has_public_address(server)"}],"source_content_type":"text/x-python","patch_set":34,"id":"9aed3d3a_6f55c1f8","line":259,"range":{"start_line":259,"start_character":26,"end_line":259,"end_character":30},"in_reply_to":"9aed3d3a_53afc993","updated":"2016-02-28 23:30:26.000000000","message":"please see comment above.","commit_id":"fbfd65b33874689fcd97220297b44d4f71502159"}],"manila/share/drivers/lvm.py":[{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"f1b0703f3d30dfae8ca86fbc719d29348d076192","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        This driver has two different behaviors according to parameters:"},{"line_number":271,"context_line":"        1. Recovery after error - \u0027access_rules\u0027 contains all access_rules,"},{"line_number":272,"context_line":"        \u0027add_rules\u0027 and \u0027delete_rules\u0027 are None. Previously existing access"},{"line_number":273,"context_line":"        rules are cleared and then added back according to \u0027access_rules\u0027."},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        2. Adding/Deleting of several access rules - \u0027access_rules\u0027 contains"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_fb471375","line":272,"range":{"start_line":272,"start_character":39,"end_line":272,"end_character":42},"updated":"2016-02-10 20:50:53.000000000","message":"I\u0027d update this to be \"shall be\". It makes it clear that the recovery case is only entered if both \u0027add_rules\u0027 and \u0027delete_rules\u0027 are None.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"}],"manila/share/utils.py":[{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"398c1605dc4c85a04098980c0964c488fde70132","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            return None"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def convert_none_to_list(*args):"},{"line_number":77,"context_line":"    \"\"\"Return parameters as tuple, with empty lists instead of None values.\"\"\""},{"line_number":78,"context_line":"    result \u003d ()"},{"line_number":79,"context_line":"    for arg in args:"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_923a5acc","line":76,"updated":"2016-02-19 13:21:20.000000000","message":"Is it really needed? It looks like one can do a check against None on the spot, so probably this function is excessive.","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"046ea4b58b6c346e9f5f8ae11d0bad7b83eb7c0f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            return None"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def convert_none_to_list(*args):"},{"line_number":77,"context_line":"    \"\"\"Return parameters as tuple, with empty lists instead of None values.\"\"\""},{"line_number":78,"context_line":"    result \u003d ()"},{"line_number":79,"context_line":"    for arg in args:"}],"source_content_type":"text/x-python","patch_set":25,"id":"bae84128_ccaa8519","line":76,"in_reply_to":"bae84128_923a5acc","updated":"2016-02-19 15:12:18.000000000","message":"Done","commit_id":"d28ff99e085d0aa0ec01a78735938a202013d74a"}],"manila/tests/share/drivers/test_generic.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1c04d4c84fe421ea24ac811cfd9e921fb760c70a","unresolved":false,"context_lines":[{"line_number":2115,"context_line":"        local_path \u003d os.path.join(CONF.share_mount_path, self.share_name)"},{"line_number":2116,"context_line":"        exec_result \u003d \u0027 \u0027.join([local_path, \u00272.2.2.2\u0027])"},{"line_number":2117,"context_line":"        self.mock_object(self._helper, \u0027_ssh_exec\u0027,"},{"line_number":2118,"context_line":"                         mock.Mock(return_value\u003d(exec_result, _)))"},{"line_number":2119,"context_line":"        self.assertRaises("},{"line_number":2120,"context_line":"            exception.ShareAccessExists,"},{"line_number":2121,"context_line":"            self._helper.update_access,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_a27b58f4","line":2118,"range":{"start_line":2118,"start_character":62,"end_line":2118,"end_character":63},"updated":"2015-12-18 18:14:56.000000000","message":"_ is not assigned to return... \n\nprefer _ only for internationalization; please return \u0027 \u0027","commit_id":"e72879e0aa2806a83a3a0bb6b2209c9c349c39c9"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":1197,"context_line":"                          self._context, self.share, share_server\u003dself.server)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"    @ddt.data(const.ACCESS_LEVEL_RW, const.ACCESS_LEVEL_RO)"},{"line_number":1200,"context_line":"    def test_update_access(self, access_level):"},{"line_number":1201,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027, access_level), ]"},{"line_number":1202,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"},{"line_number":1203,"context_line":"        delete_rules \u003d [get_fake_access_rule(\u00273.3.3.3\u0027, access_level), ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_760d34e7","line":1200,"range":{"start_line":1200,"start_character":8,"end_line":1200,"end_character":26},"updated":"2015-12-28 10:27:44.000000000","message":"this","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":2077,"context_line":"        self.assertEqual(expected_location, ret)"},{"line_number":2078,"context_line":""},{"line_number":2079,"context_line":"    @ddt.data(const.ACCESS_LEVEL_RW, const.ACCESS_LEVEL_RO)"},{"line_number":2080,"context_line":"    def test_update_access(self, access_level):"},{"line_number":2081,"context_line":"        self.mock_object(self._helper, \u0027_sync_nfs_temp_and_perm_files\u0027)"},{"line_number":2082,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027, access_level), ]"},{"line_number":2083,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_36ea4cdc","line":2080,"range":{"start_line":2080,"start_character":8,"end_line":2080,"end_character":26},"updated":"2015-12-28 10:27:44.000000000","message":"and this have same names. please, rename it.","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":2350,"context_line":"            ),"},{"line_number":2351,"context_line":"        ])"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"    def test_update_access(self):"},{"line_number":2354,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027,"},{"line_number":2355,"context_line":"                                             const.ACCESS_LEVEL_RW), ]"},{"line_number":2356,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, const.ACCESS_LEVEL_RW), ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_f6efe4e6","line":2353,"range":{"start_line":2353,"start_character":8,"end_line":2353,"end_character":26},"updated":"2015-12-28 10:27:44.000000000","message":"and this one too.","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9dbdf8500b8c74df19789a099a88a526cf932973","unresolved":false,"context_lines":[{"line_number":2412,"context_line":"            self.server_details,"},{"line_number":2413,"context_line":"            self.share_name)"},{"line_number":2414,"context_line":""},{"line_number":2415,"context_line":"    def test_update_access_recovery_mode(self):"},{"line_number":2416,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027,"},{"line_number":2417,"context_line":"                                             const.ACCESS_LEVEL_RW), ]"},{"line_number":2418,"context_line":"        self.mock_object(self._helper, \u0027_set_allow_hosts\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a7b0d38_76a9b48f","line":2415,"updated":"2015-12-28 10:27:44.000000000","message":"same here - line 2130 with same test name.\n\nSo, right now, it is not clear what test do what, how do they overlap, if they do...","commit_id":"2cb9b29ca64b231ef9f05a0a5cba940a4333a3e3"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"70176d6dc2b48a7d8e241f02de6873c447060054","unresolved":false,"context_lines":[{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    @ddt.data(const.ACCESS_LEVEL_RW, const.ACCESS_LEVEL_RO)"},{"line_number":1204,"context_line":"    def test_update_access(self, access_level):"},{"line_number":1205,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027, access_level), ]"},{"line_number":1206,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"},{"line_number":1207,"context_line":"        delete_rules \u003d [get_fake_access_rule(\u00273.3.3.3\u0027, access_level), ]"},{"line_number":1208,"context_line":"        self._driver.update_access(self._context, self.share, access_rules,"},{"line_number":1209,"context_line":"                                   add_rules\u003dadd_rules,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_f5a7bbba","line":1206,"range":{"start_line":1205,"start_character":0,"end_line":1206,"end_character":69},"updated":"2016-02-12 11:37:07.000000000","message":"access_rules should contain add_rules. Please fix.","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"56d07a5d8cec780e524b037644d82ec450540fb6","unresolved":false,"context_lines":[{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    @ddt.data(const.ACCESS_LEVEL_RW, const.ACCESS_LEVEL_RO)"},{"line_number":1204,"context_line":"    def test_update_access(self, access_level):"},{"line_number":1205,"context_line":"        access_rules \u003d [get_fake_access_rule(\u00271.1.1.1\u0027, access_level), ]"},{"line_number":1206,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"},{"line_number":1207,"context_line":"        delete_rules \u003d [get_fake_access_rule(\u00273.3.3.3\u0027, access_level), ]"},{"line_number":1208,"context_line":"        self._driver.update_access(self._context, self.share, access_rules,"},{"line_number":1209,"context_line":"                                   add_rules\u003dadd_rules,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_d337374b","line":1206,"range":{"start_line":1205,"start_character":0,"end_line":1206,"end_character":69},"in_reply_to":"3a57f1b5_f5a7bbba","updated":"2016-02-12 12:20:30.000000000","message":"Done","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3bec37b8ea2c4b654752e633456c681b0e5227d9","unresolved":false,"context_lines":[{"line_number":1206,"context_line":"                        get_fake_access_rule(\u00272.2.2.2\u0027, access_level)]"},{"line_number":1207,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"},{"line_number":1208,"context_line":"        delete_rules \u003d [get_fake_access_rule(\u00273.3.3.3\u0027, access_level), ]"},{"line_number":1209,"context_line":"        self._driver.update_access(self._context, self.share, access_rules,"},{"line_number":1210,"context_line":"                                   add_rules\u003dadd_rules,"},{"line_number":1211,"context_line":"                                   delete_rules\u003ddelete_rules,"},{"line_number":1212,"context_line":"                                   share_server\u003dself.server)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_da1d12bf","line":1209,"range":{"start_line":1209,"start_character":8,"end_line":1209,"end_character":75},"updated":"2016-02-26 01:13:06.000000000","message":"Please use whitespace to separate unit tests into 3 sections (mocks, call, asserts).","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":1206,"context_line":"                        get_fake_access_rule(\u00272.2.2.2\u0027, access_level)]"},{"line_number":1207,"context_line":"        add_rules \u003d [get_fake_access_rule(\u00272.2.2.2\u0027, access_level), ]"},{"line_number":1208,"context_line":"        delete_rules \u003d [get_fake_access_rule(\u00273.3.3.3\u0027, access_level), ]"},{"line_number":1209,"context_line":"        self._driver.update_access(self._context, self.share, access_rules,"},{"line_number":1210,"context_line":"                                   add_rules\u003dadd_rules,"},{"line_number":1211,"context_line":"                                   delete_rules\u003ddelete_rules,"},{"line_number":1212,"context_line":"                                   share_server\u003dself.server)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_d909802e","line":1209,"range":{"start_line":1209,"start_character":8,"end_line":1209,"end_character":75},"in_reply_to":"9aed3d3a_da1d12bf","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"}],"manila/tests/share/drivers/test_helpers.py":[{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"ca294f399f95dba7ef7fb3afd37bd3382ff41412","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            [\u00271.1.1.1\u0027, ],"},{"line_number":466,"context_line":"            self.share_name)"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def test_get_allow_hosts(self):"},{"line_number":469,"context_line":"        # TODO(ganso): get an example output to use here"},{"line_number":470,"context_line":"        self._helper._get_allow_hosts(self.server_details, self.share_name)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    @ddt.data("},{"line_number":473,"context_line":"        \u0027\u0027, \u00271.2.3.4:/nfs/like/export\u0027, \u0027/1.2.3.4/foo\u0027, \u0027\\\\1.2.3.4\\\\foo\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_e68f8a73","line":470,"range":{"start_line":468,"start_character":0,"end_line":470,"end_character":75},"updated":"2016-02-09 17:01:24.000000000","message":"You could assert _ssh_exec was called with the correct parameters.","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"7b9c6a3efdfa9ea856c061b46d4f3cd66d905ca5","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            [\u00271.1.1.1\u0027, ],"},{"line_number":466,"context_line":"            self.share_name)"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def test_get_allow_hosts(self):"},{"line_number":469,"context_line":"        # TODO(ganso): get an example output to use here"},{"line_number":470,"context_line":"        self._helper._get_allow_hosts(self.server_details, self.share_name)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    @ddt.data("},{"line_number":473,"context_line":"        \u0027\u0027, \u00271.2.3.4:/nfs/like/export\u0027, \u0027/1.2.3.4/foo\u0027, \u0027\\\\1.2.3.4\\\\foo\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_806d6006","line":470,"range":{"start_line":468,"start_character":0,"end_line":470,"end_character":75},"in_reply_to":"5a5ae5dd_e68f8a73","updated":"2016-02-10 14:20:01.000000000","message":"Done","commit_id":"24fd5c3ee3d56dfa516697721712157a656b4eb2"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"f1b0703f3d30dfae8ca86fbc719d29348d076192","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def test_update_access_wrong_access_level(self):"},{"line_number":380,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":381,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RO), ]"},{"line_number":382,"context_line":"        self.assertRaises("},{"line_number":383,"context_line":"            exception.InvalidShareAccessLevel,"},{"line_number":384,"context_line":"            self._helper.update_access,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_d61c6915","line":381,"range":{"start_line":381,"start_character":23,"end_line":381,"end_character":44},"updated":"2016-02-10 20:50:53.000000000","message":"According to the helper.py file, in the _check_valid_access() method on line 129, it\u0027s saying that both ACCESS_LEVEL_RW and ACCESS_LEVEL_RW are valid possibilities for the access level value. It\u0027s possible that something in the chain is getting mocked out because this should be succeeding according to the code.\n\nDoing \"./run_tests -c test_update_access_wrong_access_level\" shows a coverage report that does not cover either update_access() or _check_valid_access(). Something strange is going on here.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"72bc6833a2a449f1770d1d49332ac48dd41fd62e","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def test_update_access_wrong_access_level(self):"},{"line_number":380,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":381,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RO), ]"},{"line_number":382,"context_line":"        self.assertRaises("},{"line_number":383,"context_line":"            exception.InvalidShareAccessLevel,"},{"line_number":384,"context_line":"            self._helper.update_access,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_3dd4b81e","line":381,"range":{"start_line":381,"start_character":23,"end_line":381,"end_character":44},"in_reply_to":"3a57f1b5_0ca994df","updated":"2016-02-10 22:02:37.000000000","message":"Yup, you\u0027re exactly right! I was looking at the wrong test. I blame Gerrit hiding the class declaration from me :)","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"2091ecde6f580dfb0de908c49dc27ddc9a928755","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def test_update_access_wrong_access_level(self):"},{"line_number":380,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":381,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RO), ]"},{"line_number":382,"context_line":"        self.assertRaises("},{"line_number":383,"context_line":"            exception.InvalidShareAccessLevel,"},{"line_number":384,"context_line":"            self._helper.update_access,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_0ca994df","line":381,"range":{"start_line":381,"start_character":23,"end_line":381,"end_character":44},"in_reply_to":"3a57f1b5_d61c6915","updated":"2016-02-10 21:11:41.000000000","message":"Actually there are several helper classes on the helpers.py file. The _check_valid_access() method you checked is from the NFSHelper class. This test is testing the CIFSHelperIPAccess class which has its own _check_valid_access() method on line 330.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"f1b0703f3d30dfae8ca86fbc719d29348d076192","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            self.share_name,"},{"line_number":387,"context_line":"            access_rules)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def test_update_access_wrong_access_type(self):"},{"line_number":390,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":391,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RW, access_type\u003d\u0027fake\u0027), ]"},{"line_number":392,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_1671a1e0","line":389,"updated":"2016-02-10 20:50:53.000000000","message":"This test seems to also suffer from the same problem as test_update_access_wrong_access_level() above. No coverage was shown after running this test.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"2091ecde6f580dfb0de908c49dc27ddc9a928755","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            self.share_name,"},{"line_number":387,"context_line":"            access_rules)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def test_update_access_wrong_access_type(self):"},{"line_number":390,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":391,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RW, access_type\u003d\u0027fake\u0027), ]"},{"line_number":392,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_cc929c9f","line":389,"in_reply_to":"3a57f1b5_1671a1e0","updated":"2016-02-10 21:11:41.000000000","message":"The same applies here.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17780,"name":"Dustin Schoenbrun","email":"dschoenb@redhat.com","username":"dschoenb"},"change_message_id":"72bc6833a2a449f1770d1d49332ac48dd41fd62e","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            self.share_name,"},{"line_number":387,"context_line":"            access_rules)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def test_update_access_wrong_access_type(self):"},{"line_number":390,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":391,"context_line":"            \u00272.2.2.2\u0027, const.ACCESS_LEVEL_RW, access_type\u003d\u0027fake\u0027), ]"},{"line_number":392,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_dde32404","line":389,"in_reply_to":"3a57f1b5_cc929c9f","updated":"2016-02-10 22:02:37.000000000","message":"Same as above!.","commit_id":"cc2598e454bf0e171b7811346f26a80ee7467c05"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"70176d6dc2b48a7d8e241f02de6873c447060054","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        exec_result \u003d \u0027 \u0027.join([local_path, \u00272.2.2.3\u0027])"},{"line_number":79,"context_line":"        self.mock_object(self._helper, \u0027_ssh_exec\u0027,"},{"line_number":80,"context_line":"                         mock.Mock(return_value\u003d(exec_result, \u0027\u0027)))"},{"line_number":81,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":82,"context_line":"            \u00271.1.1.1\u0027, access_level), ]"},{"line_number":83,"context_line":"        add_rules \u003d ["},{"line_number":84,"context_line":"            test_generic.get_fake_access_rule(\u00272.2.2.2\u0027, access_level),"},{"line_number":85,"context_line":"            test_generic.get_fake_access_rule(\u00272.2.2.3\u0027, access_level)]"},{"line_number":86,"context_line":"        delete_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":87,"context_line":"            \u00273.3.3.3\u0027, access_level), ]"},{"line_number":88,"context_line":"        self._helper.update_access(self.server, self.share_name, access_rules,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_d5d4ff20","line":85,"range":{"start_line":81,"start_character":0,"end_line":85,"end_character":71},"updated":"2016-02-12 11:37:07.000000000","message":"This is wrong. access_rules should contain add_rules. Please fix.","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"56d07a5d8cec780e524b037644d82ec450540fb6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        exec_result \u003d \u0027 \u0027.join([local_path, \u00272.2.2.3\u0027])"},{"line_number":79,"context_line":"        self.mock_object(self._helper, \u0027_ssh_exec\u0027,"},{"line_number":80,"context_line":"                         mock.Mock(return_value\u003d(exec_result, \u0027\u0027)))"},{"line_number":81,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":82,"context_line":"            \u00271.1.1.1\u0027, access_level), ]"},{"line_number":83,"context_line":"        add_rules \u003d ["},{"line_number":84,"context_line":"            test_generic.get_fake_access_rule(\u00272.2.2.2\u0027, access_level),"},{"line_number":85,"context_line":"            test_generic.get_fake_access_rule(\u00272.2.2.3\u0027, access_level)]"},{"line_number":86,"context_line":"        delete_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":87,"context_line":"            \u00273.3.3.3\u0027, access_level), ]"},{"line_number":88,"context_line":"        self._helper.update_access(self.server, self.share_name, access_rules,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_7341a3a8","line":85,"range":{"start_line":81,"start_character":0,"end_line":85,"end_character":71},"in_reply_to":"3a57f1b5_d5d4ff20","updated":"2016-02-12 12:20:30.000000000","message":"Done","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"70176d6dc2b48a7d8e241f02de6873c447060054","unresolved":false,"context_lines":[{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    def test_update_access_exception_type(self):"},{"line_number":543,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":544,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027ip\u0027)]"},{"line_number":545,"context_line":"        self.assertRaises(exception.InvalidShareAccess,"},{"line_number":546,"context_line":"                          self._helper.update_access, self.server_details,"},{"line_number":547,"context_line":"                          self.share_name, access_rules, None, None)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_f5d6db4d","line":544,"range":{"start_line":544,"start_character":21,"end_line":544,"end_character":25},"updated":"2016-02-12 11:37:07.000000000","message":"const.ACCESS_LEVEL_RW","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"56d07a5d8cec780e524b037644d82ec450540fb6","unresolved":false,"context_lines":[{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    def test_update_access_exception_type(self):"},{"line_number":543,"context_line":"        access_rules \u003d [test_generic.get_fake_access_rule("},{"line_number":544,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027ip\u0027)]"},{"line_number":545,"context_line":"        self.assertRaises(exception.InvalidShareAccess,"},{"line_number":546,"context_line":"                          self._helper.update_access, self.server_details,"},{"line_number":547,"context_line":"                          self.share_name, access_rules, None, None)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_3347abbd","line":544,"range":{"start_line":544,"start_character":21,"end_line":544,"end_character":25},"in_reply_to":"3a57f1b5_f5d6db4d","updated":"2016-02-12 12:20:30.000000000","message":"Done","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"70176d6dc2b48a7d8e241f02de6873c447060054","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"    def test_update_access(self):"},{"line_number":550,"context_line":"        access_list \u003d [test_generic.get_fake_access_rule("},{"line_number":551,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027user\u0027),"},{"line_number":552,"context_line":"            test_generic.get_fake_access_rule("},{"line_number":553,"context_line":"                \u0027user2\u0027, \u0027ro\u0027, access_type\u003d\u0027user\u0027)]"},{"line_number":554,"context_line":"        self._helper.update_access(self.server_details, self.share_name,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_d55f1fe3","line":551,"range":{"start_line":551,"start_character":21,"end_line":551,"end_character":25},"updated":"2016-02-12 11:37:07.000000000","message":"const.ACCESS_LEVEL_RW","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"56d07a5d8cec780e524b037644d82ec450540fb6","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"    def test_update_access(self):"},{"line_number":550,"context_line":"        access_list \u003d [test_generic.get_fake_access_rule("},{"line_number":551,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027user\u0027),"},{"line_number":552,"context_line":"            test_generic.get_fake_access_rule("},{"line_number":553,"context_line":"                \u0027user2\u0027, \u0027ro\u0027, access_type\u003d\u0027user\u0027)]"},{"line_number":554,"context_line":"        self._helper.update_access(self.server_details, self.share_name,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_5344a7b5","line":551,"range":{"start_line":551,"start_character":21,"end_line":551,"end_character":25},"in_reply_to":"3a57f1b5_d55f1fe3","updated":"2016-02-12 12:20:30.000000000","message":"Done","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"70176d6dc2b48a7d8e241f02de6873c447060054","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        access_list \u003d [test_generic.get_fake_access_rule("},{"line_number":551,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027user\u0027),"},{"line_number":552,"context_line":"            test_generic.get_fake_access_rule("},{"line_number":553,"context_line":"                \u0027user2\u0027, \u0027ro\u0027, access_type\u003d\u0027user\u0027)]"},{"line_number":554,"context_line":"        self._helper.update_access(self.server_details, self.share_name,"},{"line_number":555,"context_line":"                                   access_list, None, None)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_b55aa3f0","line":553,"range":{"start_line":553,"start_character":25,"end_line":553,"end_character":29},"updated":"2016-02-12 11:37:07.000000000","message":"const.ACCESS_LEVEL_RO","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"56d07a5d8cec780e524b037644d82ec450540fb6","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        access_list \u003d [test_generic.get_fake_access_rule("},{"line_number":551,"context_line":"            \u0027user1\u0027, \u0027rw\u0027, access_type\u003d\u0027user\u0027),"},{"line_number":552,"context_line":"            test_generic.get_fake_access_rule("},{"line_number":553,"context_line":"                \u0027user2\u0027, \u0027ro\u0027, access_type\u003d\u0027user\u0027)]"},{"line_number":554,"context_line":"        self._helper.update_access(self.server_details, self.share_name,"},{"line_number":555,"context_line":"                                   access_list, None, None)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a57f1b5_f31353b6","line":553,"range":{"start_line":553,"start_character":25,"end_line":553,"end_character":29},"in_reply_to":"3a57f1b5_b55aa3f0","updated":"2016-02-12 12:20:30.000000000","message":"Done","commit_id":"4c0e26a65562077036b04e0a000e67fc4f04bf0f"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3bec37b8ea2c4b654752e633456c681b0e5227d9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            self._helper, \u0027_ssh_exec\u0027,"},{"line_number":55,"context_line":"            mock.Mock(side_effect\u003dexception.ProcessExecutionError("},{"line_number":56,"context_line":"                stderr\u003d\u0027command not found\u0027)))"},{"line_number":57,"context_line":"        self.assertRaises(exception.ManilaException,"},{"line_number":58,"context_line":"                          self._helper.init_helper, self.server)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_init_helper_log(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_fa4e16c0","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":25},"updated":"2016-02-26 01:13:06.000000000","message":"In this case, use whitespace to separate mocks from asserts.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            self._helper, \u0027_ssh_exec\u0027,"},{"line_number":55,"context_line":"            mock.Mock(side_effect\u003dexception.ProcessExecutionError("},{"line_number":56,"context_line":"                stderr\u003d\u0027command not found\u0027)))"},{"line_number":57,"context_line":"        self.assertRaises(exception.ManilaException,"},{"line_number":58,"context_line":"                          self._helper.init_helper, self.server)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_init_helper_log(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_398eac78","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":25},"in_reply_to":"9aed3d3a_fa4e16c0","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3bec37b8ea2c4b654752e633456c681b0e5227d9","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            self._helper, \u0027_ssh_exec\u0027,"},{"line_number":63,"context_line":"            mock.Mock(side_effect\u003dexception.ProcessExecutionError("},{"line_number":64,"context_line":"                stderr\u003d\u0027fake\u0027)))"},{"line_number":65,"context_line":"        self._helper.init_helper(self.server)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_create_export(self):"},{"line_number":68,"context_line":"        ret \u003d self._helper.create_export(self.server, self.share_name)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_1af3fa74","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":45},"updated":"2016-02-26 01:13:06.000000000","message":"Need a blank line, and there\u0027s no assert here.  Are you just ensuring nothing blows up?","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            self._helper, \u0027_ssh_exec\u0027,"},{"line_number":63,"context_line":"            mock.Mock(side_effect\u003dexception.ProcessExecutionError("},{"line_number":64,"context_line":"                stderr\u003d\u0027fake\u0027)))"},{"line_number":65,"context_line":"        self._helper.init_helper(self.server)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_create_export(self):"},{"line_number":68,"context_line":"        ret \u003d self._helper.create_export(self.server, self.share_name)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_79ee7423","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":45},"in_reply_to":"9aed3d3a_1af3fa74","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"}],"manila/tests/share/drivers/test_lvm.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3bec37b8ea2c4b654752e633456c681b0e5227d9","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                                   add_rules\u003dadd_rules,"},{"line_number":377,"context_line":"                                   delete_rules\u003ddelete_rules,"},{"line_number":378,"context_line":"                                   share_server\u003dself.server)"},{"line_number":379,"context_line":"        self._driver._helpers[self.share[\u0027share_proto\u0027]].\\"},{"line_number":380,"context_line":"            update_access.assert_called_once_with("},{"line_number":381,"context_line":"                self.server, self.share[\u0027name\u0027],"},{"line_number":382,"context_line":"                access_rules, add_rules\u003dadd_rules, delete_rules\u003ddelete_rules)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_1a365a03","line":379,"range":{"start_line":379,"start_character":57,"end_line":379,"end_character":58},"updated":"2016-02-26 01:13:06.000000000","message":"Please use () instead of \\ for line continuation.","commit_id":"218101a159ea8abd4645245863739993a67887ca"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"073a8d18ce944d8bb1ad70dd5331ae5e0d30e26c","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                                   add_rules\u003dadd_rules,"},{"line_number":377,"context_line":"                                   delete_rules\u003ddelete_rules,"},{"line_number":378,"context_line":"                                   share_server\u003dself.server)"},{"line_number":379,"context_line":"        self._driver._helpers[self.share[\u0027share_proto\u0027]].\\"},{"line_number":380,"context_line":"            update_access.assert_called_once_with("},{"line_number":381,"context_line":"                self.server, self.share[\u0027name\u0027],"},{"line_number":382,"context_line":"                access_rules, add_rules\u003dadd_rules, delete_rules\u003ddelete_rules)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9aed3d3a_19fac8bd","line":379,"range":{"start_line":379,"start_character":57,"end_line":379,"end_character":58},"in_reply_to":"9aed3d3a_1a365a03","updated":"2016-02-26 20:50:16.000000000","message":"Done","commit_id":"218101a159ea8abd4645245863739993a67887ca"}]}
