)]}'
{"smaug/loadables.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d24ffea69eccadd175750503cac3c99588f868a5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.loadable_cls_type \u003d loadable_cls_type"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_correct_class(self, obj):"},{"line_number":58,"context_line":"        \"\"\"Return whether an object is a class of the correct type and"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        is not prefixed with an underscore."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return (inspect.isclass(obj) and"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_ce04694b","line":60,"range":{"start_line":58,"start_character":11,"end_line":60,"end_character":43},"updated":"2016-01-31 13:51:09.000000000","message":"The first line should be concise enough to fit.\nIf you cant do it you need to skip it.","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"74794a4b6436e169f218e790fb42a7eb1c6f4481","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.loadable_cls_type \u003d loadable_cls_type"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_correct_class(self, obj):"},{"line_number":58,"context_line":"        \"\"\"Return whether an object is a class of the correct type and"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        is not prefixed with an underscore."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return (inspect.isclass(obj) and"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_28bc0adb","line":60,"range":{"start_line":58,"start_character":11,"end_line":60,"end_character":43},"in_reply_to":"7a5de9d1_ce04694b","updated":"2016-02-01 02:38:12.000000000","message":"Done","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d24ffea69eccadd175750503cac3c99588f868a5","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                classes.append(itm)"},{"line_number":78,"context_line":"        return classes"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def get_all_classes(self):"},{"line_number":81,"context_line":"        \"\"\"Get the classes of the type we want from all modules found"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        in the directory that defines this class."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_5cda734d","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":23},"updated":"2016-01-31 13:51:09.000000000","message":"Should be memoized since it shouldn\u0027t change at runtime.","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"74794a4b6436e169f218e790fb42a7eb1c6f4481","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                classes.append(itm)"},{"line_number":78,"context_line":"        return classes"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def get_all_classes(self):"},{"line_number":81,"context_line":"        \"\"\"Get the classes of the type we want from all modules found"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        in the directory that defines this class."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_88ec1ef4","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":23},"in_reply_to":"7a5de9d1_5cda734d","updated":"2016-02-01 02:38:12.000000000","message":"yes, i get all Operation class by this function and create Operation object when init OperatonManager object. do i answer your question? or i don\u0027t understand your comment.thanks.","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":15069,"name":"zhonghuali","email":"lizhonghua.li@huawei.com","username":"sloblee"},"change_message_id":"efbb1e7aa482e41a4bf821844097645d39a32bc5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011-2012 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":13,"id":"9aed3d3a_2cbd7a02","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-02-29 09:21:58.000000000","message":"update with current year","commit_id":"74325f2ef572359f5b1e702c0235d1fa83487118"}],"smaug/operationengine/operation_manager.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d24ffea69eccadd175750503cac3c99588f868a5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        cls \u003d self._get_operation_cls(operation_type)\r"},{"line_number":52,"context_line":"        cls.check_operation_definition(operation_definition)\r"},{"line_number":53,"context_line":"\r"},{"line_number":54,"context_line":"    def exe_operation(self, operation_type, project_id, operation_definition,\r"},{"line_number":55,"context_line":"                      exe_log_obj):\r"},{"line_number":56,"context_line":"        \"\"\"Execute operation.\r"},{"line_number":57,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_fcb31f98","line":54,"range":{"start_line":54,"start_character":8,"end_line":54,"end_character":11},"updated":"2016-01-31 13:51:09.000000000","message":"chars are free.\n execute_operation","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"74794a4b6436e169f218e790fb42a7eb1c6f4481","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        cls \u003d self._get_operation_cls(operation_type)\r"},{"line_number":52,"context_line":"        cls.check_operation_definition(operation_definition)\r"},{"line_number":53,"context_line":"\r"},{"line_number":54,"context_line":"    def exe_operation(self, operation_type, project_id, operation_definition,\r"},{"line_number":55,"context_line":"                      exe_log_obj):\r"},{"line_number":56,"context_line":"        \"\"\"Execute operation.\r"},{"line_number":57,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_e8b11202","line":54,"range":{"start_line":54,"start_character":8,"end_line":54,"end_character":11},"in_reply_to":"7a5de9d1_fcb31f98","updated":"2016-02-01 02:38:12.000000000","message":"Done","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"d9ac1841673765311212c68f2d3ff4fd3cfc4a6e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                object of objects:operation_exe_logs:OperationExeLogs\r"},{"line_number":63,"context_line":"        :raise InvalidInput if the operation_type is invalid.\r"},{"line_number":64,"context_line":"        \"\"\"\r"},{"line_number":65,"context_line":"        obj \u003d self._get_operation_cls(operation_type)\r"},{"line_number":66,"context_line":"        obj.execute(project_id, operation_definition, exe_log_obj)\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_ea45bb17","line":65,"range":{"start_line":65,"start_character":19,"end_line":65,"end_character":37},"updated":"2016-02-14 03:42:19.000000000","message":"_get_operation_object","commit_id":"70a8472c6bfe0cd9def3c4560b8a3bcff791a4f5"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"ba1733fb0a7a39957131f12d0bb87d72783c385e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                object of objects:operation_exe_logs:OperationExeLogs\r"},{"line_number":63,"context_line":"        :raise InvalidInput if the operation_type is invalid.\r"},{"line_number":64,"context_line":"        \"\"\"\r"},{"line_number":65,"context_line":"        obj \u003d self._get_operation_cls(operation_type)\r"},{"line_number":66,"context_line":"        obj.execute(project_id, operation_definition, exe_log_obj)\r"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_7574f0fc","line":65,"range":{"start_line":65,"start_character":19,"end_line":65,"end_character":37},"in_reply_to":"dae33548_ea45bb17","updated":"2016-02-14 06:35:25.000000000","message":"yes, you are right! thanks.","commit_id":"70a8472c6bfe0cd9def3c4560b8a3bcff791a4f5"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"c305a00090f1c1cac4b9bff686c9daf3af829187","unresolved":false,"context_lines":[{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"        :param operation_type: the type of operation\r"},{"line_number":47,"context_line":"        :param operation_definition: the definition of operation\r"},{"line_number":48,"context_line":"        :raise InvalidInput if the operation_type or operation_definition\r"},{"line_number":49,"context_line":"                is invalid.\r"},{"line_number":50,"context_line":"        \"\"\"\r"},{"line_number":51,"context_line":"        obj \u003d self._get_operation_object(operation_type)\r"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_f1c6c098","line":48,"updated":"2016-02-23 06:26:10.000000000","message":"InvalidOperationDefinition is raised if operation_definition checking invalid.","commit_id":"e7420152d255fdabdfc17d78c28e7e84c311ddb1"},{"author":{"_account_id":15069,"name":"zhonghuali","email":"lizhonghua.li@huawei.com","username":"sloblee"},"change_message_id":"efbb1e7aa482e41a4bf821844097645d39a32bc5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        super(OperationManager, self).__init__()\r"},{"line_number":27,"context_line":"\r"},{"line_number":28,"context_line":"        all_cls \u003d operations.all_operations()\r"},{"line_number":29,"context_line":"        self._operation_obj_map \u003d {cls.OPERATION_TYPE:\r"},{"line_number":30,"context_line":"                                   cls() for cls in all_cls}\r"},{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"    def _get_operation_object(self, operation_type):\r"}],"source_content_type":"text/x-python","patch_set":13,"id":"9aed3d3a_8c9c865e","line":29,"range":{"start_line":29,"start_character":13,"end_line":29,"end_character":31},"updated":"2016-02-29 09:21:58.000000000","message":"I am not sure I completely understood why we need create a instances map here, if there is no difference between the objects with each operation type, I would rather use the class directly.please check.","commit_id":"74325f2ef572359f5b1e702c0235d1fa83487118"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"7037d25aeca1e60c43e519462692f6539906d29c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        super(OperationManager, self).__init__()\r"},{"line_number":27,"context_line":"\r"},{"line_number":28,"context_line":"        all_cls \u003d operations.all_operations()\r"},{"line_number":29,"context_line":"        self._operation_obj_map \u003d {cls.OPERATION_TYPE:\r"},{"line_number":30,"context_line":"                                   cls() for cls in all_cls}\r"},{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"    def _get_operation_object(self, operation_type):\r"}],"source_content_type":"text/x-python","patch_set":13,"id":"7af24918_60cb43a6","line":29,"range":{"start_line":29,"start_character":13,"end_line":29,"end_character":31},"in_reply_to":"9aed3d3a_8c9c865e","updated":"2016-03-02 08:54:29.000000000","message":"yes, your are right. i will recheck.","commit_id":"74325f2ef572359f5b1e702c0235d1fa83487118"}],"smaug/operationengine/operations/__init__.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d24ffea69eccadd175750503cac3c99588f868a5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from smaug import loadables\r"},{"line_number":18,"context_line":"\r"},{"line_number":19,"context_line":"\r"},{"line_number":20,"context_line":"class Operation(object):\r"},{"line_number":21,"context_line":"\r"},{"line_number":22,"context_line":"    @staticmethod\r"},{"line_number":23,"context_line":"    def check_operation_definition(operation_definition):\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_1cb95b79","line":20,"range":{"start_line":20,"start_character":6,"end_line":20,"end_character":15},"updated":"2016-01-31 13:51:09.000000000","message":"use abc[1]\n\n[1] https://docs.python.org/2/library/abc.html","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"74794a4b6436e169f218e790fb42a7eb1c6f4481","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from smaug import loadables\r"},{"line_number":18,"context_line":"\r"},{"line_number":19,"context_line":"\r"},{"line_number":20,"context_line":"class Operation(object):\r"},{"line_number":21,"context_line":"\r"},{"line_number":22,"context_line":"    @staticmethod\r"},{"line_number":23,"context_line":"    def check_operation_definition(operation_definition):\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_c8c9b65a","line":20,"range":{"start_line":20,"start_character":6,"end_line":20,"end_character":15},"in_reply_to":"7a5de9d1_1cb95b79","updated":"2016-02-01 02:38:12.000000000","message":"Done","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d24ffea69eccadd175750503cac3c99588f868a5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\r"},{"line_number":20,"context_line":"class Operation(object):\r"},{"line_number":21,"context_line":"\r"},{"line_number":22,"context_line":"    @staticmethod\r"},{"line_number":23,"context_line":"    def check_operation_definition(operation_definition):\r"},{"line_number":24,"context_line":"        \"\"\"Check operation definition\r"},{"line_number":25,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_7ca88f20","line":22,"range":{"start_line":22,"start_character":5,"end_line":22,"end_character":17},"updated":"2016-01-31 13:51:09.000000000","message":"static methods are inherently non overridable.","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"74794a4b6436e169f218e790fb42a7eb1c6f4481","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\r"},{"line_number":20,"context_line":"class Operation(object):\r"},{"line_number":21,"context_line":"\r"},{"line_number":22,"context_line":"    @staticmethod\r"},{"line_number":23,"context_line":"    def check_operation_definition(operation_definition):\r"},{"line_number":24,"context_line":"        \"\"\"Check operation definition\r"},{"line_number":25,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_68c20236","line":22,"range":{"start_line":22,"start_character":5,"end_line":22,"end_character":17},"in_reply_to":"7a5de9d1_7ca88f20","updated":"2016-02-01 02:38:12.000000000","message":"Done","commit_id":"f3b2d8ea185bc423e436cb8e9d40ed4b8a30da10"}]}
