)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactoring of mysql, msserver and mongo code."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements blueprint: application-hook-refactoring"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I6df7ae22ec17479dc926cc4e764091487544b5fb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_82d56a1d","line":9,"range":{"start_line":9,"start_character":22,"end_line":9,"end_character":33},"updated":"2016-02-17 10:02:29.000000000","message":"could you elaborate more in the bp? and could be a good idea to sync with the team to define the general architecture for this.","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/backup.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"0337330064a5884adb9514cac3f81a4cdeca1902","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                backup_opt_dict.path_to_backup,"},{"line_number":139,"context_line":"                backup_opt_dict.windows_volume)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            # execute this after the snapshot creation"},{"line_number":142,"context_line":"            return True"},{"line_number":143,"context_line":"        return False"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_71a03744","line":141,"updated":"2016-03-02 10:16:50.000000000","message":"This comment should be deleted too","commit_id":"d8385da332b78e652a8a46aba515df01ebf3b709"}],"freezer/hook/__init__.py":[{"author":{"_account_id":13940,"name":"Saad Zaher","email":"eng.szaher@gmail.com","username":"szaher"},"change_message_id":"ec44ba0ec3d1d462022e38700e5a581e8cc0acac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"dae33548_e90ee039","line":1,"updated":"2016-02-17 09:35:12.000000000","message":"We need to rename this folder to mods as we will have multiple hooks in freezer like hooks for storage, engine,db, ... so I think I could be better to rename this to mods","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/hook/hook.py":[{"author":{"_account_id":13940,"name":"Saad Zaher","email":"eng.szaher@gmail.com","username":"szaher"},"change_message_id":"ec44ba0ec3d1d462022e38700e5a581e8cc0acac","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class Hook(object):"},{"line_number":17,"context_line":"    def prepare(self):"},{"line_number":18,"context_line":"        raise NotImplementedError(\"Should have implemented this\")"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_c44ae325","line":16,"updated":"2016-02-17 09:35:12.000000000","message":"Can we rename Hook to Mod ?\n\nDo We need an initialization function that takes configuration because some hooks needs some conf to be passed through the init function ?\n\nWhat about adding a function that retrieves mod information ?\nlike hook name, version ??\n\nDo we need to make the hook to register it\u0027s own configurations to freezer conf ?\n\nDo we need to define a hard coded default hook ? or we can provide configuration file for this ? (We can say fs is the default mod if no mod is available ?)\n\nCan we use six and abc to abstract this class, just to enforce the Mod developers to follow the design guide lines and implements these functions ? \nUseful link (why we need six and abc ): https://dzone.com/articles/python-six-abc-and-functoolswraps-1","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/hook/mongo.py":[{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        logging.info(\u0027[*] MongoDB backup is being executed...\u0027)"},{"line_number":38,"context_line":"        logging.info(\u0027[*] Checking is the localhost is Master/Primary...\u0027)"},{"line_number":39,"context_line":"        mongodb_port \u003d \u002727017\u0027"},{"line_number":40,"context_line":"        local_hostname \u003d hostname"},{"line_number":41,"context_line":"        db_host_port \u003d \u0027{0}:{1}\u0027.format(local_hostname, mongodb_port)"},{"line_number":42,"context_line":"        mongo_client \u003d pymongo.MongoClient(db_host_port)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_e2f8b6c5","line":39,"range":{"start_line":39,"start_character":24,"end_line":39,"end_character":29},"updated":"2016-02-17 10:02:29.000000000","message":"we need to find a way to not hardcode this.","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/hook/mysql.py":[{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            self.mysql_db_inst.close()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def prepare(self):"},{"line_number":38,"context_line":"        self.cursor \u003d self.mysql_db_inst.cursor()"},{"line_number":39,"context_line":"        self.cursor.execute(\u0027FLUSH TABLES WITH READ LOCK\u0027)"},{"line_number":40,"context_line":"        self.mysql_db_inst.commit()"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_c2977238","line":38,"range":{"start_line":38,"start_character":13,"end_line":38,"end_character":19},"updated":"2016-02-17 10:02:29.000000000","message":"we should find a way to not fail on this part if mysql is already shutdown","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/job.py":[{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from freezer import backup"},{"line_number":23,"context_line":"from freezer import exec_cmd"},{"line_number":24,"context_line":"from freezer.hook import dummy"},{"line_number":25,"context_line":"from freezer.hook import mongo"},{"line_number":26,"context_line":"from freezer.hook import mysql"},{"line_number":27,"context_line":"from freezer.hook import sqlserver"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_42f1a294","line":24,"range":{"start_line":24,"start_character":13,"end_line":24,"end_character":17},"updated":"2016-02-17 10:02:29.000000000","message":"as saad said, this should be called modes or hooks.mode","commit_id":"8562249495b4ec863973d58067935683b237e3ce"},{"author":{"_account_id":13940,"name":"Saad Zaher","email":"eng.szaher@gmail.com","username":"szaher"},"change_message_id":"ec44ba0ec3d1d462022e38700e5a581e8cc0acac","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except Exception as error:"},{"line_number":83,"context_line":"            logging.error(\u0027Error while sync exec: {0}\u0027.format(error))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        if self.conf.mode \u003d\u003d \u0027fs\u0027:"},{"line_number":86,"context_line":"            app_hook \u003d dummy.DummyHook()"},{"line_number":87,"context_line":"        elif self.conf.mode \u003d\u003d \u0027mongo\u0027:"},{"line_number":88,"context_line":"            app_hook \u003d mongo.MongoDbHook(self.conf.hostname)"},{"line_number":89,"context_line":"        elif self.conf.mode \u003d\u003d \u0027mysql\u0027:"},{"line_number":90,"context_line":"            app_hook \u003d mysql.MySqlHook(self.conf.mysql_conf)"},{"line_number":91,"context_line":"        elif self.conf.mode \u003d\u003d \u0027sqlserver\u0027:"},{"line_number":92,"context_line":"            app_hook \u003d sqlserver.SqlServerHook(self.conf.sql_server_conf)"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            raise ValueError(\u0027Please provide a valid backup mode\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        backup.backup(self.conf, self.storage, self.engine, app_hook)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_44c1b353","line":94,"range":{"start_line":85,"start_character":8,"end_line":94,"end_character":66},"updated":"2016-02-17 09:35:12.000000000","message":"Can we use oslo.utils to automatically import mods if the mod is available instead of hard coding the mods ?","commit_id":"8562249495b4ec863973d58067935683b237e3ce"},{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except Exception as error:"},{"line_number":83,"context_line":"            logging.error(\u0027Error while sync exec: {0}\u0027.format(error))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        if self.conf.mode \u003d\u003d \u0027fs\u0027:"},{"line_number":86,"context_line":"            app_hook \u003d dummy.DummyHook()"},{"line_number":87,"context_line":"        elif self.conf.mode \u003d\u003d \u0027mongo\u0027:"},{"line_number":88,"context_line":"            app_hook \u003d mongo.MongoDbHook(self.conf.hostname)"},{"line_number":89,"context_line":"        elif self.conf.mode \u003d\u003d \u0027mysql\u0027:"},{"line_number":90,"context_line":"            app_hook \u003d mysql.MySqlHook(self.conf.mysql_conf)"},{"line_number":91,"context_line":"        elif self.conf.mode \u003d\u003d \u0027sqlserver\u0027:"},{"line_number":92,"context_line":"            app_hook \u003d sqlserver.SqlServerHook(self.conf.sql_server_conf)"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            raise ValueError(\u0027Please provide a valid backup mode\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        backup.backup(self.conf, self.storage, self.engine, app_hook)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_e2255609","line":94,"range":{"start_line":85,"start_character":8,"end_line":94,"end_character":66},"in_reply_to":"dae33548_44c1b353","updated":"2016-02-17 10:02:29.000000000","message":"+1 on this","commit_id":"8562249495b4ec863973d58067935683b237e3ce"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"9b19a8e477c369c041286135be94ac3d97cc728b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.engine \u003d conf_dict.engine"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def execute(self):"},{"line_number":47,"context_line":"        logging.info(\u0027[*] Action not implemented\u0027)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @staticmethod"},{"line_number":50,"context_line":"    def executemethod(func):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_49e432e0","line":47,"updated":"2016-03-03 01:57:25.000000000","message":"I think raise NotImplement is better","commit_id":"d70111a7244ef6c50de21ea5a4a70995b347812b"},{"author":{"_account_id":15358,"name":"Eldar Nugaev","email":"eldar.nugaev@hp.com","username":"eldar"},"change_message_id":"bda87ac40fd2854e846ac33c0a0318130994bab7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.engine \u003d conf_dict.engine"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def execute(self):"},{"line_number":47,"context_line":"        logging.info(\u0027[*] Action not implemented\u0027)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @staticmethod"},{"line_number":50,"context_line":"    def executemethod(func):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_686ab6ef","line":47,"in_reply_to":"7af24918_49e432e0","updated":"2016-03-03 10:01:20.000000000","message":"Probably yes, but it is not my line. I suppose it is better to keep my changes small. Only that is related to my commit.","commit_id":"d70111a7244ef6c50de21ea5a4a70995b347812b"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"9b19a8e477c369c041286135be94ac3d97cc728b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                           restore_timestamp)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            self.engine.restore(backup, restore_abs_path)"},{"line_number":129,"context_line":"            return"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        res \u003d restore.RestoreOs(conf.client_manager, conf.container)"},{"line_number":132,"context_line":"        if conf.backup_media \u003d\u003d \u0027nova\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_09734a16","line":129,"updated":"2016-03-03 01:57:25.000000000","message":"I think this line should be kept same with line 140","commit_id":"d70111a7244ef6c50de21ea5a4a70995b347812b"}],"freezer/lvm.py":[{"author":{"_account_id":14340,"name":"Memo Garcia","email":"guillermo.ramirez-garcia@hp.com","username":"memogarcia"},"change_message_id":"ee92e1a48ea457d0a1d36ad076eb09311b2576a4","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            backup_opt_dict.lvm_snapname,"},{"line_number":112,"context_line":"            backup_opt_dict.lvm_srcvol))"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    lvm_process \u003d subprocess.Popen("},{"line_number":115,"context_line":"        lvm_create_command, stdin\u003dsubprocess.PIPE, stdout\u003dsubprocess.PIPE,"},{"line_number":116,"context_line":"        stderr\u003dsubprocess.PIPE, shell\u003dTrue,"},{"line_number":117,"context_line":"        executable\u003dutils.find_executable(\u0027bash\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_628026c1","line":114,"range":{"start_line":114,"start_character":4,"end_line":114,"end_character":15},"updated":"2016-02-17 10:02:29.000000000","message":"we should mode snapshots to a hooks.snapshot as well","commit_id":"8562249495b4ec863973d58067935683b237e3ce"}],"freezer/mod/mysql.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"0337330064a5884adb9514cac3f81a4cdeca1902","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # todo check that mysql isn\u0027t shut down"},{"line_number":48,"context_line":"        self.cursor \u003d self.mysql_db_inst.cursor()"},{"line_number":49,"context_line":"        self.cursor.execute(\u0027FLUSH TABLES WITH READ LOCK\u0027)"},{"line_number":50,"context_line":"        self.mysql_db_inst.commit()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __init__(self, conf):"},{"line_number":53,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_8cab28d6","line":50,"updated":"2016-03-02 10:16:50.000000000","message":"Is \"self.released \u003d False\" needed here?","commit_id":"d8385da332b78e652a8a46aba515df01ebf3b709"}],"freezer/tests/integration/common.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"0337330064a5884adb9514cac3f81a4cdeca1902","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            execute([self.swift_executable, \u0027delete\u0027, container + \u0027_segments\u0027])"},{"line_number":290,"context_line":"        return True"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def do_backup_and_restore_with_check(self, backup_args, restore_args):"},{"line_number":293,"context_line":"        self.source_tree.add_random_data()"},{"line_number":294,"context_line":"        self.assertTreesMatchNot()"},{"line_number":295,"context_line":"        result \u003d execute_freezerc(backup_args)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_477299ae","line":292,"updated":"2016-03-02 10:16:50.000000000","message":"I think this function name to be test_backup_and_restore follow other Openstack project","commit_id":"d8385da332b78e652a8a46aba515df01ebf3b709"}]}
