)]}'
{"manila/share/drivers/glusterfs/layout_directory.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"775c20eebffbe464bffc520e6b3777c3bee56edb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":215,"context_line":"        except Exception as exc:"},{"line_number":216,"context_line":"            if isinstance(exc, exception.ProcessExecutionError):"},{"line_number":217,"context_line":"                LOG.error(_LE(\u0027Unable to extend share %s\u0027), share[\u0027name\u0027])"},{"line_number":218,"context_line":"                exc \u003d exception.GlusterfsException(exc)"},{"line_number":219,"context_line":"            raise exc"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_cc65cfb6","line":217,"range":{"start_line":217,"start_character":26,"end_line":217,"end_character":30},"updated":"2017-06-19 02:11:59.000000000","message":"Remove","commit_id":"866ca3875a7ae47c4fae0d437d660626e3c0e818"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"78787aa60d4466c33e6b0afbb52c2e1a2bb8a296","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    def unmanage(self, share):"},{"line_number":205,"context_line":"        raise NotImplementedError"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def extend_share(self, share, new_size, share_server\u003dNone):"},{"line_number":208,"context_line":"        \"\"\"Extend a sub-directory/share from the GlusterFS volume.\"\"\""},{"line_number":209,"context_line":"        sizestr \u003d six.text_type(new_size) + \u0027GB\u0027"},{"line_number":210,"context_line":"        share_dir \u003d \u0027/\u0027 + share[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f231b9d_7139cff0","line":207,"range":{"start_line":207,"start_character":3,"end_line":207,"end_character":63},"updated":"2017-06-20 02:59:34.000000000","message":"The extend share and shrink share method should be removed from test_nonimplemented_methods. please see the link:\nhttps://github.com/openstack/manila/blob/master/manila/tests/share/drivers/glusterfs/test_layout_directory.py#L388","commit_id":"97234782aed835fd6482474c7e1fe819ca9eb805"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"efc723cf7aaed785cfbf13341b90663710d70de9","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":213,"context_line":"        try:"},{"line_number":214,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":215,"context_line":"        except Exception as exc:"},{"line_number":216,"context_line":"            if isinstance(exc, exception.ProcessExecutionError):"},{"line_number":217,"context_line":"                LOG.error(\u0027Unable to extend share %s\u0027, share[\u0027name\u0027])"},{"line_number":218,"context_line":"                exc \u003d exception.GlusterfsException(exc)"},{"line_number":219,"context_line":"            raise exc"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":222,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f231b9d_867e88e1","line":219,"range":{"start_line":215,"start_character":8,"end_line":219,"end_character":21},"updated":"2017-06-19 11:36:43.000000000","message":"exact same comment as in https://review.openstack.org/#/c/475127/1/manila/share/drivers/glusterfs/layout_directory.py\n\nplease take a look","commit_id":"97234782aed835fd6482474c7e1fe819ca9eb805"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"65cf9e08154f368b46588cc0cd8e9cf430efa503","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                \u0027limit-usage\u0027, share_dir, sizestr)"},{"line_number":213,"context_line":"        try:"},{"line_number":214,"context_line":"            self.gluster_manager.gluster_call(*args)"},{"line_number":215,"context_line":"        except Exception as exc:"},{"line_number":216,"context_line":"            if isinstance(exc, exception.ProcessExecutionError):"},{"line_number":217,"context_line":"                LOG.error(\u0027Unable to extend share %s\u0027, share[\u0027name\u0027])"},{"line_number":218,"context_line":"                exc \u003d exception.GlusterfsException(exc)"},{"line_number":219,"context_line":"            raise exc"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def shrink_share(self, share, new_size, share_server\u003dNone):"},{"line_number":222,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_f1f94d4d","line":219,"range":{"start_line":215,"start_character":8,"end_line":219,"end_character":21},"updated":"2017-06-21 10:16:37.000000000","message":"The unit test you are working on will cover the main code path up to here.  You should also add a test to cover the exception path.  You can use @ddt.data to pass exceptions in to the test as done above at test_create_share_unable_to_create_share().  Then (simpler than in that test) just mock out gluster_manager.gluster_call() to have the passed in exception as a side_effect and assert that self.gluster_manager.gluster_call() raises the exception that was passed in to the test.","commit_id":"5b515a36f7a4e84a362667ca3d588e8ca83b9aa5"}],"manila/tests/share/drivers/glusterfs/test_layout_directory.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"65cf9e08154f368b46588cc0cd8e9cf430efa503","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    def test_ensure_share(self):"},{"line_number":379,"context_line":"        self.assertIsNone(self._layout.ensure_share(self._context, self.share))"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    def test_extend_share(self, extra_args):"},{"line_number":382,"context_line":"        self.mock_object("},{"line_number":383,"context_line":"            self._layout, \u0027_get_local_share_path\u0027,"},{"line_number":384,"context_line":"            mock.Mock(return_value\u003dfake_local_share_path))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_f1c14d30","line":381,"range":{"start_line":381,"start_character":32,"end_line":381,"end_character":42},"updated":"2017-06-21 10:16:37.000000000","message":"I suggest you change this signature to:\n    test_extend_share(self, size, expected_args)\nor something like that and use @ddt.data and @ddt.unpack decorators to pass these in to the test method.  For an example see manila/tests/share/drivers/glusterfs/test_glusterfs_native.py:test_update_access_via_manager (line 192 ff).","commit_id":"5b515a36f7a4e84a362667ca3d588e8ca83b9aa5"}]}
