{
    "steps": [
        {
            "taskname": "upload_upgrade_scripts",
            "required": "TRUE",
            "operation": "FALSE",
            "site": "master",
            "child_steps": [
                {
                    "name": "upload_upgrade_scripts",
                    "function_name": "upload_script_step",
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "prepare_upgrade",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.prepare_upgrade",
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "prepare_env",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.prepare_env",
                    "cost_time": 1,
                    "scene": "product"
                }
            ]
        },
        {
            "taskname": "upgrade_check_env",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "upload_package",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_upload_package",
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "generate_analyzer_conf",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.generate_analyzer_conf",
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "upgrade_check_env",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_check_env",
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "upgrade_fi_pre",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_fi_pre",
                    "dependent": [
                        "upgrade_ndp:true"
                    ],
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "pre_check",
                    "function_name": "pre_check_step",
                    "cost_time": 1,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "backup",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "backup_product",
                    "function_name": "backup_product_step",
                    "dependent": [
                        "contain_nce:true",
                        "backup_product:true",
                        "src_lt_r22c00:true"
                    ],
                    "cost_time": 5,
                    "scene": "product"
                }
            ]
        },
        {
            "taskname": "upgrade_nce_omp",
            "no_wait_steps": "upgrade_fi_backup",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "pre_upgrade",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_cloudsop_pre",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_reinforce",
                        "upload_rollback_scripts",
                        "rollback_check",
                        "pre_rollback",
                        "start_app",
                        "post_rollback",
                        "clear_package",
                        "os_reinforce",
                        "rollback_healthcheck"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "upgrade_osmediation",
                    "function_name": "upgrade_osmediation_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_osmediation:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_osmediation"
                    ],
                    "cost_time": 2,
                    "scene": "other"
                },
                {
                    "name": "upgrade_omp",
                    "function_name": "upgrade_omp_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_omp"
                    ],
                    "cost_time": 15,
                    "scene": "product"
                },
                {
                    "name": "backup_single_uniep_db",
                    "function_name": "backup_single_uniep_step",
                    "dependent": [
                        "cotain_single_db:true",
                        "contain_nce:true",
                        "contain_omp:true",
                        "src_le_r21c00:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_omp"
                    ],
                    "cost_time": 8,
                    "scene": "product"
                }
            ]
        },
        {
            "taskname": "upgrade_fi_backup",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "upgrade_fi_backup",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_fi_backup",
                    "dependent": [
                        "upgrade_ndp:true"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                },
                {
                    "name": "upgrade_sop_fi",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_sop_fi",
                    "dependent": [
                        "upgrade_ndp:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_fi",
                        "rollback_start_product"
                    ],
                    "cost_time": 15,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "upgrade",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "upgrade_product_firstphase",
                    "function_name": "upgrade_product_firstphase_step",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_product"

                    ],
                    "cost_time": 7,
                    "scene": "product"
                },
                {
                    "name": "upgrade_product_secondphase",
                    "function_name": "upgrade_product_secondphase_step",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_product"

                    ],
                    "cost_time": 8,
                    "scene": "product"
                },
                {
                    "name": "update_mgr_db",
                    "function_name": "update_mgr_db_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_mgr_db",
                        "restore_product"
                    ],
                    "cost_time": 8,
                    "scene": "product"
                },
                {
                    "name": "post_upgrade",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_cloudsop_post",
                    "dependent": [
                        "contain_nce:true",
                        "is_suse:true"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "post_rollback"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "start_app",
                    "function_name": "start_app_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_os:false"
                    ],
                    "cost_time": 10,
                    "scene": "product"
                },
                {
                    "name": "switch_kmc",
                    "function_name": "upgrade_domain_step",
                    "dependent": [
                        "show_switch_kmc:true",
                        "contain_nce:true",
                        "is_suse:true",
                        "src_le_r21c00:true"
                    ],
                    "params": {"script_name": "{upgrade_script_path}/common/NCE-Common/switch_kmc_mode.sh",
                               "script_params": ["productname", "src_version","des_version"]},
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_switch_kmc"
                    ],
                    "cost_time": 8,
                    "scene": "other"
                },
                {
                    "name": "post_upgrade",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_cloudsop_post",
                    "dependent": [
                        "contain_nce:true",
                        "is_suse:false"
                    ],
                    "enable_rollback": "true",
                    "rollback_step": [
                        "post_rollback"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "migration_db",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.migration_db",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                }
            ]
        },
        {
            "taskname": "upgrade_post",
            "required": "TRUE",
            "operation": "FALSE",
            "site": "master",
            "child_steps": [
                {
                    "name": "upgrade_post_1",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_post",
                    "cost_time": 1,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "enable_schedule",
            "required": "TRUE",
            "operation": "FALSE",
            "site": "master",
            "child_steps": [
                {
                    "name": "enable_schedule",
                    "function_name": "enable_schedule_step",
                    "cost_time": 1,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "upgrade_os",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "upgrade",
            "site": "master",
            "child_steps": [
                {
                    "name": "stop_product",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.stop_product",
                    "dependent": [
                        "contain_os:true"
                    ],
                    "cost_time": 2,
                    "scene": "other"
                },
                {
                    "name": "upgrade_os",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_os",
                    "dependent": [
                        "contain_os:true"
                    ],
                    "cost_time": 7,
                    "scene": "other"
                },
                {
                    "name": "upgrade_reboot_os",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.reboot_os",
                    "dependent": [
                        "contain_os:true"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                },
                {
                    "name": "start_product",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.start_product",
                    "dependent": [
                        "contain_os:true"
                    ],
                    "rollback_step": [
                        "stop_product",
                        "rollback_os",
                        "rollback_reboot_os",
                        "start_product"
                    ],
                    "cost_time": 10,
                    "scene": "other"
                },
                {
                    "name": "switch_kmc",
                    "function_name": "upgrade_domain_step",
                    "dependent": [
                        "show_switch_kmc:true",
                        "contain_os:true"
                    ],
                    "params": {"script_name": "{upgrade_script_path}/common/NCE-Common/switch_kmc_mode.sh",
                               "script_params": ["productname", "src_version","des_version"]},
                    "enable_rollback": "true",
                    "rollback_step": [
                        "rollback_switch_kmc"
                    ],
                    "cost_time": 8,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "post_healthcheck",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "check",
            "site": "master",
            "child_steps": [
                {
                    "name": "post_healthcheck",
                    "function_name": "post_healthcheck_step",
                    "dependent": [
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 3,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "upgrade_confirm",
            "required": "TRUE",
            "operation": "TRUE",
            "site": "master",
            "extend_type": {
                "auto_stop_flag": "TRUE",
                "confirm_info": ["upgrade.fi_confirm"]
            },
            "child_steps": [
                {
                    "name": "upgrade_confirm",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_confirm_button",
                    "dependent": [
                        "upgrade_ndp:true"
                    ],
                    "cost_time": 1,
                    "scene": "other",
                    "notes": "confirm_info1"
                }
            ]
        },
        {
            "taskname": "clear_package",
            "required": "TRUE",
            "operation": "FALSE",
            "site": "master",
            "child_steps": [
                {
                    "name": "fi_upgrade_confirm",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.upgrade_fi_commit",
                    "dependent": [
                        "upgrade_ndp:true"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                },
                {
                    "name": "clear_package",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.clear_package",
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "os_reinforce",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.os_reinforce",
                    "cost_time": 5,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "post_healthcheck",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "check",
            "site": "master",
            "child_steps": [
                {
                    "name": "post_healthcheck",
                    "function_name": "post_healthcheck_step",
                    "dependent": [
                        "src_le_r21c00:false"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "rollback_healthcheck",
            "required": "TRUE",
            "operation": "FALSE",
            "type": "rollback",
            "site": "master",
            "extend_type": {
                "dfs_check": "yes"
            },
            "child_steps": [
                {
                    "name": "rollback_healthcheck",
                    "function_name": "pre_healthcheck_step",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 3,
                    "scene": "other"
                }
            ]
        },
        {
            "taskname": "rollback1",
            "required": "FALSE",
            "operation": "FALSE",
            "type": "rollback",
            "site": "master",
            "child_steps": [
                {
                    "name": "rollback_reinforce",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_reinforce",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "stop_product",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_os_stop_product",
                    "dependent": [
                        "contain_os:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                },
                {
                    "name": "rollback_os",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_os",
                    "dependent": [
                        "contain_os:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "rollback_reboot_os",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_reboot_os",
                    "dependent": [
                        "contain_os:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 5,
                    "scene": "other"
                },
                {
                    "name": "start_product",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_os_start_product",
                    "dependent": [
                        "contain_os:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 15,
                    "scene": "other"
                },
                {
                    "name": "upload_rollback_scripts",
                    "function_name": "upload_script_step",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "rollback_check",
                    "function_name": "pre_rollback_onesite_step",
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "rollback_switch_kmc",
                    "function_name": "upgrade_domain_step",
                    "dependent": [
                        "show_switch_kmc:true",
                        "contain_nce:true"
                    ],
                    "params": {"script_name": "{upgrade_script_path}/common/NCE-Common/switch_cloudop_mode.sh",
                               "script_params": ["productname", "src_version","des_version"]},
                    "cost_time": 10,
                    "scene": "other"
                },
                {
                    "name": "pre_rollback",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_pre",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "rollback_product",
                    "function_name": "rollback_product_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_product:true"
                    ],
                    "cost_time": 20,
                    "scene": "product"
                },
                {
                    "name": "rollback_omp",
                    "function_name": "rollback_omp_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true",
                        "src_le_r21c00:false"
                    ],
                    "cost_time": 20,
                    "scene": "product"
                },
                {
                    "name": "rollback_mgr_db",
                    "function_name": "rollback_mgr_db_step_without_bksigntool",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true",
                        "src_lt_r22c00:true"
                    ],
                    "cost_time": 30,
                    "scene": "product"
                },
                {
                    "name": "rollback_osmediation",
                    "function_name": "rollback_osmediation_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_osmediation:true",
                        "src_le_r21c00:false"
                    ],
                    "cost_time": 10,
                    "scene": "other"
                },
                {
                    "name": "rollback_omp",
                    "function_name": "rollback_omp_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_omp:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 20,
                    "scene": "product"
                },
                {
                    "name": "rollback_osmediation",
                    "function_name": "rollback_osmediation_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_osmediation:true",
                        "src_le_r21c00:true"
                    ],
                    "cost_time": 10,
                    "scene": "other"
                },
                {
                    "name": "rollback_fi",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_fi",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 1,
                    "scene": "product"
                },
                {
                    "name": "restore_product",
                    "function_name": "restore_product_step",
                    "dependent": [
                        "contain_nce:true",
                        "contain_product:true",
                        "src_lt_r22c00:true"
                    ],
                    "cost_time": 10,
                    "scene": "product"
                },
                {
                    "name": "post_rollback",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_post",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 2,
                    "scene": "product"
                },
                {
                    "name": "rollback_start_product",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_start_product",
                    "dependent": [
                        "contain_nce:true"
                    ],
                    "cost_time": 15,
                    "scene": "product"
                },
                {
                    "name": "start_app",
                    "function_name": "start_app_new_step",
                    "dependent": [
                        "contain_nce:true",
                        "src_le_r21c00:false"
                    ],
                    "cost_time": 10,
                    "scene": "product"
                },
                {
                    "name": "clear_package",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_clear_package",
                    "cost_time": 1,
                    "scene": "other"
                },
                {
                    "name": "os_reinforce",
                    "function_name": "plugins.CampusInsight.upgrade_online.website.data.rollback_os_reinforce",
                    "cost_time": 5,
                    "scene": "other"
                }
            ]
        }
    ]
}
