)]}'
{"smaug/services/protection/flows/__init__.py":[{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"e4b6de1e6e2938d1a40920c9917142ccb12e6bf0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027Administrator\u0027\r"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_0ba98124","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":10},"updated":"2016-02-17 06:56:07.000000000","message":"This should be deleted.","commit_id":"7856a4115e79d25fb4da2ed8121789317ba84a4b"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"c6e8251ea7379fd81bb99eaf6122f76b745db0d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"__author__ \u003d \u0027Administrator\u0027\r"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_90f13d04","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":10},"in_reply_to":"dae33548_0ba98124","updated":"2016-02-17 08:00:03.000000000","message":"Done","commit_id":"7856a4115e79d25fb4da2ed8121789317ba84a4b"}],"smaug/services/protection/flows/create_protection.py":[{"author":{"_account_id":19346,"name":"yinwei","email":"yinweiishere@icloud.com","username":"yinwei"},"change_message_id":"99cfa5c0ab1965c8395c6f87edf5ef1a53347e52","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if constants.CHECKPOINT_STATUS_PROTECTING in status.values():"},{"line_number":79,"context_line":"            checkpoint.status \u003d constants.CHECKPOINT_STATUS_PROTECTING"},{"line_number":80,"context_line":"            return"},{"line_number":81,"context_line":"        checkpoint.status \u003d constants.CHECKPOINT_STATUS_FINISHED"},{"line_number":82,"context_line":"        raise loopingcall.LoopingCallDone()"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da0c15f0_1b5c68ec","line":81,"updated":"2016-03-28 02:41:36.000000000","message":"3 questions here:\n1. checkpoint status should be Finsihed or available?\n2. shall we persist the checkpoint status in bank?\n3. shall we notify API layer the checkpoint status updated?\nPls. confirm those details.  If there\u0027s any dependency, at least we need comment a TODO item for reminder.","commit_id":"7af0571875c79c27e1f5041d4d0575114bece3f7"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"4744930cf5f5ba7ed0be204b4bf91c19421ecae9","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if constants.CHECKPOINT_STATUS_PROTECTING in status.values():"},{"line_number":79,"context_line":"            checkpoint.status \u003d constants.CHECKPOINT_STATUS_PROTECTING"},{"line_number":80,"context_line":"            return"},{"line_number":81,"context_line":"        checkpoint.status \u003d constants.CHECKPOINT_STATUS_FINISHED"},{"line_number":82,"context_line":"        raise loopingcall.LoopingCallDone()"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_f1fc7540","line":81,"in_reply_to":"da0c15f0_1b5c68ec","updated":"2016-03-29 03:19:13.000000000","message":"1. I\u0027m not sure finished or available,maybe available is good\n2. Yes\n3. We will return the checkpoint id ,API layer should call list checkpoint or show checkpoint to get the checkpoint status","commit_id":"7af0571875c79c27e1f5041d4d0575114bece3f7"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CreateCheckpointTask(task.Task):"},{"line_number":34,"context_line":"    def __init__(self, plan, provider):"},{"line_number":35,"context_line":"        provides \u003d \u0027checkpoint\u0027"},{"line_number":36,"context_line":"        super(CreateCheckpointTask, self).__init__(provides\u003dprovides)"},{"line_number":37,"context_line":"        self._plan \u003d plan"},{"line_number":38,"context_line":"        self._provider \u003d provider"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def execute(self):"},{"line_number":41,"context_line":"        checkpoint_collection \u003d self._provider.get_checkpoint_collection()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_e7afe57a","line":38,"range":{"start_line":34,"start_character":0,"end_line":38,"end_character":33},"updated":"2016-04-07 13:47:41.000000000","message":"provider unused.","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":89,"context_line":"def get_flow(context, workflow_engine, operation_type, plan, provider):"},{"line_number":90,"context_line":"    ctx \u003d {\u0027context\u0027: context,"},{"line_number":91,"context_line":"           \u0027plan\u0027: plan,"},{"line_number":92,"context_line":"           \u0027task_builder\u0027: workflow_engine,"},{"line_number":93,"context_line":"           \u0027operation_type\u0027: operation_type}"},{"line_number":94,"context_line":"    flow_name \u003d \"create_protection_\" + plan.get(\u0027id\u0027)"},{"line_number":95,"context_line":"    protection_flow \u003d workflow_engine.build_flow(flow_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_2780bdf4","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":43},"updated":"2016-04-07 13:47:41.000000000","message":"See workflow.py comment in 285149.\nIf we have WorkFlowEngine and TaskBuilder interfaces, we can\u0027t assume this workflow_engine is also a TaskBuilder.\nConsider merging TaskBuilder into WorkFlowEngine and rename this dictionary key.","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":89,"context_line":"def get_flow(context, workflow_engine, operation_type, plan, provider):"},{"line_number":90,"context_line":"    ctx \u003d {\u0027context\u0027: context,"},{"line_number":91,"context_line":"           \u0027plan\u0027: plan,"},{"line_number":92,"context_line":"           \u0027task_builder\u0027: workflow_engine,"},{"line_number":93,"context_line":"           \u0027operation_type\u0027: operation_type}"},{"line_number":94,"context_line":"    flow_name \u003d \"create_protection_\" + plan.get(\u0027id\u0027)"},{"line_number":95,"context_line":"    protection_flow \u003d workflow_engine.build_flow(flow_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_939f135f","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":43},"in_reply_to":"9a061dce_2780bdf4","updated":"2016-04-11 07:12:41.000000000","message":"OK,I will think about this","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":92,"context_line":"           \u0027task_builder\u0027: workflow_engine,"},{"line_number":93,"context_line":"           \u0027operation_type\u0027: operation_type}"},{"line_number":94,"context_line":"    flow_name \u003d \"create_protection_\" + plan.get(\u0027id\u0027)"},{"line_number":95,"context_line":"    protection_flow \u003d workflow_engine.build_flow(flow_name)"},{"line_number":96,"context_line":"    result \u003d provider.build_task_flow(ctx)"},{"line_number":97,"context_line":"    status_getters \u003d result.get(\u0027status_getters\u0027)"},{"line_number":98,"context_line":"    resource_flow \u003d result.get(\u0027task_flow\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_47504c0b","line":95,"range":{"start_line":95,"start_character":0,"end_line":95,"end_character":59},"updated":"2016-04-07 13:47:41.000000000","message":"flow needs to be linear","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":92,"context_line":"           \u0027task_builder\u0027: workflow_engine,"},{"line_number":93,"context_line":"           \u0027operation_type\u0027: operation_type}"},{"line_number":94,"context_line":"    flow_name \u003d \"create_protection_\" + plan.get(\u0027id\u0027)"},{"line_number":95,"context_line":"    protection_flow \u003d workflow_engine.build_flow(flow_name)"},{"line_number":96,"context_line":"    result \u003d provider.build_task_flow(ctx)"},{"line_number":97,"context_line":"    status_getters \u003d result.get(\u0027status_getters\u0027)"},{"line_number":98,"context_line":"    resource_flow \u003d result.get(\u0027task_flow\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_1382e300","line":95,"range":{"start_line":95,"start_character":0,"end_line":95,"end_character":59},"in_reply_to":"9a061dce_47504c0b","updated":"2016-04-11 07:12:41.000000000","message":"good catch","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    result \u003d provider.build_task_flow(ctx)"},{"line_number":97,"context_line":"    status_getters \u003d result.get(\u0027status_getters\u0027)"},{"line_number":98,"context_line":"    resource_flow \u003d result.get(\u0027task_flow\u0027)"},{"line_number":99,"context_line":"    protection_flow.add(CreateCheckpointTask(plan, provider),"},{"line_number":100,"context_line":"                        resource_flow,"},{"line_number":101,"context_line":"                        SyncCheckpointStatusTask(status_getters))"},{"line_number":102,"context_line":"    flow_engine \u003d workflow_engine.get_engine(protection_flow)"},{"line_number":103,"context_line":"    return flow_engine"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_62774302","line":101,"range":{"start_line":99,"start_character":0,"end_line":101,"end_character":65},"updated":"2016-04-07 13:47:41.000000000","message":"We can\u0027t assume protection_flow has a \u0027.add()\u0027 method.\nUse workflow_engine.add_task(protection_flow, ...)","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    result \u003d provider.build_task_flow(ctx)"},{"line_number":97,"context_line":"    status_getters \u003d result.get(\u0027status_getters\u0027)"},{"line_number":98,"context_line":"    resource_flow \u003d result.get(\u0027task_flow\u0027)"},{"line_number":99,"context_line":"    protection_flow.add(CreateCheckpointTask(plan, provider),"},{"line_number":100,"context_line":"                        resource_flow,"},{"line_number":101,"context_line":"                        SyncCheckpointStatusTask(status_getters))"},{"line_number":102,"context_line":"    flow_engine \u003d workflow_engine.get_engine(protection_flow)"},{"line_number":103,"context_line":"    return flow_engine"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_3379df30","line":101,"range":{"start_line":99,"start_character":0,"end_line":101,"end_character":65},"in_reply_to":"9a061dce_62774302","updated":"2016-04-11 07:12:41.000000000","message":"Done","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"c3939f288fdfa10b4bc2918b24b63e192e8681e7","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"sync_status_opts \u003d ["},{"line_number":22,"context_line":"    cfg.IntOpt(\u0027sync_status_interval\u0027,"},{"line_number":23,"context_line":"               default\u003d600,"},{"line_number":24,"context_line":"               help\u003d\u0027update protection status interval\u0027)"},{"line_number":25,"context_line":"]"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_19728649","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":27},"updated":"2016-05-10 08:42:57.000000000","message":"10 minutes? Maybe consider lower? (1 minutes, 2 minutes)","commit_id":"9dd933dab9f37bb69d14f571dcc50e8d0df1a04e"}],"smaug/services/protection/flows/manager.py":[{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF.register_opts(workflow_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class Worker(object):"},{"line_number":36,"context_line":"    def __init__(self, engine_path\u003dNone):"},{"line_number":37,"context_line":"        try:"},{"line_number":38,"context_line":"            self.workflow_engine \u003d self._load_engine(engine_path)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_31159be4","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":21},"updated":"2016-04-07 13:47:41.000000000","message":"consider changing filename to worker.py","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":32,"context_line":"CONF.register_opts(workflow_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class Worker(object):"},{"line_number":36,"context_line":"    def __init__(self, engine_path\u003dNone):"},{"line_number":37,"context_line":"        try:"},{"line_number":38,"context_line":"            self.workflow_engine \u003d self._load_engine(engine_path)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_f39da75a","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":21},"in_reply_to":"9a061dce_31159be4","updated":"2016-04-11 07:12:41.000000000","message":"OK","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        engine \u003d importutils.import_object(engine_path)"},{"line_number":47,"context_line":"        return engine"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_flow(self, contest, operation_type, plan, provider):"},{"line_number":50,"context_line":"        if operation_type \u003d\u003d constants.OPERATION_PROTECT:"},{"line_number":51,"context_line":"            protection_flow \u003d create_protection.get_flow(contest,"},{"line_number":52,"context_line":"                                                         self.workflow_engine,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_eed982f4","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":64},"updated":"2016-04-07 13:47:41.000000000","message":"plan and provider are \u0027protect\u0027 specific. Consider changing to **kwargs.","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        engine \u003d importutils.import_object(engine_path)"},{"line_number":47,"context_line":"        return engine"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_flow(self, contest, operation_type, plan, provider):"},{"line_number":50,"context_line":"        if operation_type \u003d\u003d constants.OPERATION_PROTECT:"},{"line_number":51,"context_line":"            protection_flow \u003d create_protection.get_flow(contest,"},{"line_number":52,"context_line":"                                                         self.workflow_engine,"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_93ad538b","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":64},"in_reply_to":"9a061dce_eed982f4","updated":"2016-04-11 07:12:41.000000000","message":"Done","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"}],"smaug/services/protection/flows/workflow.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"777278a68fc44f32a2f0403ef60089fba9a78c26","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        super(TaskFlowEngine, self).__init__()\r"},{"line_number":86,"context_line":"\r"},{"line_number":87,"context_line":"    def build_flow(self, plan, provider):\r"},{"line_number":88,"context_line":"        operation \u003d plan.get(\"operation_type\", None)\r"},{"line_number":89,"context_line":"        if operation \u003d\u003d \"protect\":\r"},{"line_number":90,"context_line":"            return self._build_protection_flow(plan, provider)\r"},{"line_number":91,"context_line":"        # TODO(wangliuan) the other operation we haven\u0027t implemented\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_f7e52838","line":88,"updated":"2016-02-17 03:12:15.000000000","message":"I think operation type is separated from plan object, can get operation_type from it?","commit_id":"bed798d8be7727dc10edaeed91a7e06b8839afef"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"777278a68fc44f32a2f0403ef60089fba9a78c26","unresolved":false,"context_lines":[{"line_number":86,"context_line":"\r"},{"line_number":87,"context_line":"    def build_flow(self, plan, provider):\r"},{"line_number":88,"context_line":"        operation \u003d plan.get(\"operation_type\", None)\r"},{"line_number":89,"context_line":"        if operation \u003d\u003d \"protect\":\r"},{"line_number":90,"context_line":"            return self._build_protection_flow(plan, provider)\r"},{"line_number":91,"context_line":"        # TODO(wangliuan) the other operation we haven\u0027t implemented\r"},{"line_number":92,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_9795bc88","line":89,"range":{"start_line":89,"start_character":24,"end_line":89,"end_character":33},"updated":"2016-02-17 03:12:15.000000000","message":"Suggest defining some constants for the possible operation type.","commit_id":"bed798d8be7727dc10edaeed91a7e06b8839afef"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"e4b6de1e6e2938d1a40920c9917142ccb12e6bf0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        super(TaskFlowEngine, self).__init__()\r"},{"line_number":86,"context_line":"\r"},{"line_number":87,"context_line":"    def build_flow(self, plan, provider):\r"},{"line_number":88,"context_line":"        operation \u003d plan.get(\"operation_type\", None)\r"},{"line_number":89,"context_line":"        if operation \u003d\u003d \"protect\":\r"},{"line_number":90,"context_line":"            return self._build_protection_flow(plan, provider)\r"},{"line_number":91,"context_line":"        # TODO(wangliuan) the other operation we haven\u0027t implemented\r"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_6644c41a","line":88,"range":{"start_line":88,"start_character":30,"end_line":88,"end_character":44},"updated":"2016-02-17 06:56:07.000000000","message":"The version object plan doesn\u0027t have a \"operation_type\" property.","commit_id":"7856a4115e79d25fb4da2ed8121789317ba84a4b"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"c6e8251ea7379fd81bb99eaf6122f76b745db0d1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        super(TaskFlowEngine, self).__init__()\r"},{"line_number":86,"context_line":"\r"},{"line_number":87,"context_line":"    def build_flow(self, plan, provider):\r"},{"line_number":88,"context_line":"        operation \u003d plan.get(\"operation_type\", None)\r"},{"line_number":89,"context_line":"        if operation \u003d\u003d \"protect\":\r"},{"line_number":90,"context_line":"            return self._build_protection_flow(plan, provider)\r"},{"line_number":91,"context_line":"        # TODO(wangliuan) the other operation we haven\u0027t implemented\r"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_70291937","line":88,"range":{"start_line":88,"start_character":30,"end_line":88,"end_character":44},"in_reply_to":"dae33548_6644c41a","updated":"2016-02-17 08:00:03.000000000","message":"I would go to confirm this","commit_id":"7856a4115e79d25fb4da2ed8121789317ba84a4b"}],"smaug/services/protection/manager.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8a28c6a658d736c89fa552d0e0dba162fa5ab428","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":70,"context_line":"        provider \u003d self.provider_registry.show_provider(provider_id)"},{"line_number":71,"context_line":"        if not provider:"},{"line_number":72,"context_line":"            LOG.exception(_LE(\"provider not found\"))"},{"line_number":73,"context_line":"            # TODO(wangliuan) raise ProviderNotFound error"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            protection_flow \u003d self.workflow_manager.get_flow(plan, provider)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_6f43a213","line":72,"range":{"start_line":72,"start_character":44,"end_line":72,"end_character":49},"updated":"2016-02-18 12:22:48.000000000","message":"Please print which provider not found.","commit_id":"2264054cf0c6792b6323fe79972933915e4bc6b0"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8a28c6a658d736c89fa552d0e0dba162fa5ab428","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":70,"context_line":"        provider \u003d self.provider_registry.show_provider(provider_id)"},{"line_number":71,"context_line":"        if not provider:"},{"line_number":72,"context_line":"            LOG.exception(_LE(\"provider not found\"))"},{"line_number":73,"context_line":"            # TODO(wangliuan) raise ProviderNotFound error"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            protection_flow \u003d self.workflow_manager.get_flow(plan, provider)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_4f505e0b","line":72,"range":{"start_line":72,"start_character":16,"end_line":72,"end_character":25},"updated":"2016-02-18 12:22:48.000000000","message":"should use LOG.error.\nLOG.exception is only used while catching exception.","commit_id":"2264054cf0c6792b6323fe79972933915e4bc6b0"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"8a28c6a658d736c89fa552d0e0dba162fa5ab428","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            protection_flow \u003d self.workflow_manager.get_flow(plan, provider)"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_LE(\"Failed to create protection flow\"))"},{"line_number":78,"context_line":"            raise exception.SmaugException(_("},{"line_number":79,"context_line":"                \"Failed to create protection flow\""},{"line_number":80,"context_line":"            ))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_4f085eda","line":77,"updated":"2016-02-18 12:22:48.000000000","message":"Please print create flow failed for which plan.","commit_id":"2264054cf0c6792b6323fe79972933915e4bc6b0"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5e2e57abed52543330bf4906a1b195c62ff30102","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        \"\"\"create protection for the given plan"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param plan: Define that protection plan should be done"},{"line_number":67,"context_line":"        \"\"\""},{"line_number":68,"context_line":"        plan[\u0027operation_type\u0027] \u003d constants.OPERATION_PROTECT"},{"line_number":69,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":70,"context_line":"        plan_id \u003d plan.get(\u0027id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bae84128_4569e324","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":8},"updated":"2016-02-22 06:24:50.000000000","message":"Considering add a log.DEBUG here.","commit_id":"477074f2921604d82eff0174c64811ede56a4687"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5e2e57abed52543330bf4906a1b195c62ff30102","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param plan: Define that protection plan should be done"},{"line_number":67,"context_line":"        \"\"\""},{"line_number":68,"context_line":"        plan[\u0027operation_type\u0027] \u003d constants.OPERATION_PROTECT"},{"line_number":69,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":70,"context_line":"        plan_id \u003d plan.get(\u0027id\u0027, None)"},{"line_number":71,"context_line":"        provider \u003d self.provider_registry.show_provider(provider_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bae84128_e5dd9715","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":12},"updated":"2016-02-22 06:24:50.000000000","message":"IMO. As a rpc hander method, parameters none verification should be added. Parameter plan should not be none and is a Plan class object.","commit_id":"477074f2921604d82eff0174c64811ede56a4687"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"052c85a46d57364935886ea59256c780b6d35b01","unresolved":false,"context_lines":[{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"protection_manager_opts \u003d ["},{"line_number":31,"context_line":"    cfg.IntOpt(\u0027update_protection_stats_interval\u0027,"},{"line_number":32,"context_line":"               default\u003d3600,"},{"line_number":33,"context_line":"               help\u003d\u0027update protection status interval\u0027)"},{"line_number":34,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa0719c6_aa6fbf29","line":31,"range":{"start_line":31,"start_character":34,"end_line":31,"end_character":39},"updated":"2016-03-23 05:50:09.000000000","message":"status","commit_id":"3dc5b6cd602c3c04d204e79ffdb770570e097156"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"052c85a46d57364935886ea59256c780b6d35b01","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"protection_manager_opts \u003d ["},{"line_number":31,"context_line":"    cfg.IntOpt(\u0027update_protection_stats_interval\u0027,"},{"line_number":32,"context_line":"               default\u003d3600,"},{"line_number":33,"context_line":"               help\u003d\u0027update protection status interval\u0027)"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa0719c6_4a5d4378","line":32,"range":{"start_line":32,"start_character":23,"end_line":32,"end_character":27},"updated":"2016-03-23 05:50:09.000000000","message":"what unit is this number? if it\u0027s second, the default interval seems too long.","commit_id":"3dc5b6cd602c3c04d204e79ffdb770570e097156"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"a5a0bf767a4fab0df374a090c8d1b0ea2e57abe0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            LOG.exception(_LE(\"Failed to run protection flow\"))"},{"line_number":86,"context_line":"            raise"},{"line_number":87,"context_line":"        finally:"},{"line_number":88,"context_line":"            self._update_protection_stats(plan)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def restore(self, context, restore\u003dNone):"},{"line_number":91,"context_line":"        LOG.info(_LI(\"Starting restore service:restore action\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa0719c6_e5664828","line":88,"range":{"start_line":88,"start_character":17,"end_line":88,"end_character":41},"updated":"2016-03-22 03:19:57.000000000","message":"stats -\u003e state","commit_id":"3dc5b6cd602c3c04d204e79ffdb770570e097156"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"974e90f3c152a765e1d8676880eac3eea5860480","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if not plan:"},{"line_number":79,"context_line":"            raise exception.InvalidPlan(reason\u003d\u0027the protection plan is None\u0027)"},{"line_number":80,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":81,"context_line":"        plan_id \u003d plan.get(\u0027id\u0027, None)"},{"line_number":82,"context_line":"        provider \u003d self.provider_registry.show_provider(provider_id)"},{"line_number":83,"context_line":"        try:"},{"line_number":84,"context_line":"            protection_flow \u003d self.worker.get_flow(context,"},{"line_number":85,"context_line":"                                                   constants.OPERATION_PROTECT,"},{"line_number":86,"context_line":"                                                   plan,"},{"line_number":87,"context_line":"                                                   provider)"},{"line_number":88,"context_line":"        except Exception:"},{"line_number":89,"context_line":"            LOG.exception(_LE(\"Failed to create protection flow,plan:%s\"),"},{"line_number":90,"context_line":"                          plan_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_1199777c","line":87,"range":{"start_line":80,"start_character":0,"end_line":87,"end_character":60},"updated":"2016-04-07 13:47:41.000000000","message":"you can pass to get_flow() only the plan, and infer the provider in create_protection.py get_flow()","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"caeb22418bd830c749092a51271a0798bf824c09","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if not plan:"},{"line_number":79,"context_line":"            raise exception.InvalidPlan(reason\u003d\u0027the protection plan is None\u0027)"},{"line_number":80,"context_line":"        provider_id \u003d plan.get(\u0027provider_id\u0027, None)"},{"line_number":81,"context_line":"        plan_id \u003d plan.get(\u0027id\u0027, None)"},{"line_number":82,"context_line":"        provider \u003d self.provider_registry.show_provider(provider_id)"},{"line_number":83,"context_line":"        try:"},{"line_number":84,"context_line":"            protection_flow \u003d self.worker.get_flow(context,"},{"line_number":85,"context_line":"                                                   constants.OPERATION_PROTECT,"},{"line_number":86,"context_line":"                                                   plan,"},{"line_number":87,"context_line":"                                                   provider)"},{"line_number":88,"context_line":"        except Exception:"},{"line_number":89,"context_line":"            LOG.exception(_LE(\"Failed to create protection flow,plan:%s\"),"},{"line_number":90,"context_line":"                          plan_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a1b2928_73aa3772","line":87,"range":{"start_line":80,"start_character":0,"end_line":87,"end_character":60},"in_reply_to":"9a061dce_1199777c","updated":"2016-04-11 07:12:41.000000000","message":"Done","commit_id":"336d9c374895ebe930b61af9877443322dbe32d0"}],"smaug/tests/unit/protection/test_manager.py":[{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"c3939f288fdfa10b4bc2918b24b63e192e8681e7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        flow_manager.Worker._load_engine \u003d mock.Mock()"},{"line_number":37,"context_line":"        flow_manager.Worker._load_engine.return_value \u003d fakes.FakeFlowEngine()"},{"line_number":38,"context_line":"        super(ProtectionServiceTest, self).setUp()"},{"line_number":39,"context_line":"        mock_engine \u003d mock.MagicMock()"},{"line_number":40,"context_line":"        mock_engine.return_value \u003d fakes.FakeFlowEngine()"},{"line_number":41,"context_line":"        self.pro_manager \u003d manager.ProtectionManager()"},{"line_number":42,"context_line":"        self.protection_plan \u003d fakes.fake_protection_plan()"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_1b13e30e","line":40,"range":{"start_line":39,"start_character":0,"end_line":40,"end_character":57},"updated":"2016-05-10 08:42:57.000000000","message":"not used","commit_id":"9dd933dab9f37bb69d14f571dcc50e8d0df1a04e"}]}
