)]}'
{"manila/share/drivers/helpers.py":[{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"ce3c2ccbabfd8ea95bd77e09ee29498c401b0e04","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        try:"},{"line_number":407,"context_line":"            self._execute(server, [\u0027sudo\u0027, \u0027exportfs\u0027])"},{"line_number":408,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":409,"context_line":"            if \u0027command not found\u0027 in e.stderr:"},{"line_number":410,"context_line":"                raise exception.ManilaException("},{"line_number":411,"context_line":"                    _(\u0027NFS server is not installed on %s\u0027)"},{"line_number":412,"context_line":"                    % server[\u0027instance_id\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf57530f_14b17190","line":409,"updated":"2017-09-20 11:06:38.000000000","message":"Maybe use \u0027which exportfs\u0027 to find out if the binary is there? Parsing the output is error-prone. On openSUSE Tumbleweed I get eg:\n\n# exportfs-not-there\nIf \u0027exportfs-not-there\u0027 is not a typo you can use command-not-found to lookup the package that contains it, like this:\n    cnf exportfs-not-there","commit_id":"2fa4f3d4fb917c839350fe031aca1d0be228e9c5"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"16c24b4268aa32d1fd484d8e34a24433d6367b54","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import copy"},{"line_number":17,"context_line":"from io import StringIO"},{"line_number":18,"context_line":"import ipaddress"},{"line_number":19,"context_line":"import os"},{"line_number":20,"context_line":"import re"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f515b1d_4a15859b","line":17,"updated":"2017-10-09 05:52:26.000000000","message":"This should be imported from six (see https://pythonhosted.org/six/#six.StringIO )","commit_id":"0d3a0f520413f61d44c0230516ea8c791a86a6d9"},{"author":{"_account_id":20160,"name":"haobing1","email":"bing.hao@easystack.cn","username":"haobing"},"change_message_id":"81e93aa3329cc5338b1866ce7c8128cb201ae053","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # Adding/Deleting specific rules"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"            self.validate_access_rules("},{"line_number":263,"context_line":"                add_rules, (\u0027ip\u0027,),"},{"line_number":264,"context_line":"                (const.ACCESS_LEVEL_RO, const.ACCESS_LEVEL_RW))"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"            for access in delete_rules:"},{"line_number":267,"context_line":"                access_to \u003d self._get_parsed_address_or_cidr("}],"source_content_type":"text/x-python","patch_set":26,"id":"bf659307_e654f2cc","line":264,"range":{"start_line":262,"start_character":12,"end_line":264,"end_character":63},"updated":"2018-03-27 03:09:25.000000000","message":"Ben, I think this line，validate access rules, should be moved in the below for logic to fix the bug:https://bugs.launchpad.net/manila/+bug/1591357","commit_id":"d218bab66594bbc21eb7822f74a32096cced9b53"}],"manila/utils.py":[{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"ce3c2ccbabfd8ea95bd77e09ee29498c401b0e04","unresolved":false,"context_lines":[{"line_number":683,"context_line":"    return wrapped"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"def write_local_file(filename, contents, as_root\u003dFalse):"},{"line_number":687,"context_line":"    if as_root:"},{"line_number":688,"context_line":"        execute(\u0027tee\u0027, filename, run_as_root\u003dTrue, process_input\u003dcontents)"},{"line_number":689,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf57530f_7a6f77c5","line":686,"updated":"2017-09-20 11:06:38.000000000","message":"Not sure, but do we need to write the files atomically? So writing to a tmpfile and then rename (which is atomic) ? That way we would have the old file or a known good new one. Otherwise we could end with an invalid incomplete file","commit_id":"2fa4f3d4fb917c839350fe031aca1d0be228e9c5"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"bcee6537aeb651dbaca448c137a9da82e88eedc2","unresolved":false,"context_lines":[{"line_number":691,"context_line":"    else:"},{"line_number":692,"context_line":"        with open(tmp_filename, \u0027w\u0027) as f:"},{"line_number":693,"context_line":"            f.write(contents)"},{"line_number":694,"context_line":"        shutil.move(tmp_filename, filename)"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"def write_remote_file(ssh, filename, contents, as_root\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f515b1d_428788b6","line":694,"updated":"2017-09-28 15:15:03.000000000","message":"os.rename maybe?(see https://docs.python.org/2/library/os.html#os.rename)","commit_id":"c071512d07667fa52104e1a3586f2448bc4624da"}]}
