scenario:
  id: 5d6f93c1-8d4f-496e-8cd0-3a727b73e224
  context:
    auth:
      type: customized
    base_path: /api/premium/api/v1beta
    host: null
  description: ng_regional_sharedpools
  name: ng_regional_sharedpools
steps:
- operation_id: SharedPoolService_CreateSharedPool
  request_type: http
  # 9999999999999999982
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools",
      "headers": {},
      "query_params": {},
      "body": {
        "tenantId": "{tenant_id}",
        "sharedPool": {
          "id": "{sharedpool_id}"
        },
        "requestUnit": {
          "min": 5000,
          "max": 10000
        },
        "initSharedPoolConfig": {
          "tikvDataStorage": {
            "type": "gp3",
            "sizeGi": 1500,
            "iops": 8000,
            "throughputMbps": 400
          },
          "tikvRaftlogStorage": {
            "type": "gp3",
            "sizeGi": 40,
            "iops": 3000,
            "throughputMbps": 125
          },
          "tiflashCnStorage": {
            "type": "gp3",
            "sizeGi": 500,
            "iops": 6000,
            "throughputMbps": 625
          },
          "tiflashWnStorage": {
            "type": "gp3",
            "sizeGi": 500,
            "iops": 6000,
            "throughputMbps": 625
          },
          "networkCidr": "10.0.0.0/16"
        }
      },
      "body_params": {
        "sharedpool_id": "sharedpool_id",
        "tenant_id": "tenant_id"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'CREATING'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "sharedpool_1",
          "eval": "body.id"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 0
- operation_id: SharedPoolService_ListSharedPools
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.totalCount > 0"
    }
  save: null
  # save: |-
  #   {
  #     "placeholder": [
  #       {
  #         "key": "sharedpool_1",
  #         "eval": "body.sharedPools.filter(pool, pool.id == '9999999999999999982')[0].id"
  #       }
  #     ]
  #   }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 1
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV') && body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_COMPUTE') && (body.componentGroups.exists(cg, cg.componentType == 'SCHEMA_MANAGER') || body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_WRITE'))"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "component_type_1",
          "eval": "body.componentGroups.filter(cg, cg.componentType == 'TIKV')[0].componentType"
        },
        {
          "key": "tiflash_companion_component_type",
          "eval": "body.componentGroups.filter(cg, cg.componentType == 'SCHEMA_MANAGER' || cg.componentType == 'TIFLASH_WRITE')[0].componentType"
        }
      ]
    }
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2
- operation_id: SharedPoolService_SetSharedPoolComponentQuota
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:setComponentQuota",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "componentType": "PD",
        "maxNodeCount": 20,
        "minNodeCount": 3
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.1
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.filter(cg, cg.componentType == 'PD')[0].nodeQuota.maxNodeCount == 20"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.2
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV",
          "storages": [
            {
              "name": "DATA",
              "type": "io2",
              "sizeGi": 2000,
              "iops": 10000
            }
          ]
        },
        "force": true
      },
      "body_params": {
        "componentType": "component_type_1"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "check_tikv_recreated_from",
          "eval": "saved_placeholder.curr_action_do_start_unix"
        }
      ]
    }
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_storage_data'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.3
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV",
          "storages": [
            {
              "name": "RAFTLOG",
              "type": "io2",
              "sizeGi": 100,
              "iops": 4000
            }
          ]
        },
        "force": true
      },
      "body_params": {
        "componentType": "component_type_1"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_storage_raft'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.4
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV' && cg.storages.exists(s, s.name == 'RAFTLOG' && s.sizeGi == 100 && s.iops == 4000 && s.type == 'io2') && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 2000 && s.iops == 10000 && s.type == 'io2'))"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.41
- operation_id: SharedPoolService_CheckPodRecreate
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}:checkPods",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {
        "from": "check_tikv_recreated_from",
        "componentType": "TIKV"
      },
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.recreate == false && body.zoneBalance == true"
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.42
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIFLASH_COMPUTE",
          "storages": [
            {
              "name": "DATA",
              "type": "io2",
              "sizeGi": 800,
              "iops": 8000
            }
          ]
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "check_tiflash_compute_recreated_from",
          "eval": "saved_placeholder.curr_action_do_start_unix"
        }
      ]
    }
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tiflash_compute_storage_data'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.5
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_COMPUTE' && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 800 && s.iops == 8000 && s.type == 'io2'))"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.51
- operation_id: SharedPoolService_CheckPodRecreate
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}:checkPods",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {
        "from": "check_tiflash_compute_recreated_from",
        "componentType": "TIFLASH_COMPUTE"
      },
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.recreate == false && body.zoneBalance == true"
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2.52
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 16,
              "memoryGi": 32,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 6
          }
        },
        "force": true
      },
      "body_params": {
        "componentType": "component_type_1"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 3
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV' && cg.nodeQuota.nodeCount == 6 && cg.nodeQuota.nodeSpec.cpu == 16 && cg.nodeQuota.nodeSpec.memoryGi == 32 && cg.storages.exists(s, s.name == 'RAFTLOG' && s.sizeGi == 100 && s.iops ==4000 && s.type == 'io2') && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 2000 && s.iops ==10000 && s.type == 'io2'))"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 3.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIFLASH_COMPUTE",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 16,
              "memoryGi": 32,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tiflash_compute_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 5
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_COMPUTE' && cg.nodeQuota.nodeCount == 2 && cg.nodeQuota.nodeSpec.cpu == 16 && cg.nodeQuota.nodeSpec.memoryGi == 32 && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 800 && s.iops == 8000 && s.type == 'io2'))"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 5.1
- operation_id: SharedPoolService_SetHPAScaleBehavior
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:setHPAScaleBehavior",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "componentType": "TIKV_WORKER",
        "scaleDownEnabled": false
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 6.2
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 16,
              "memoryGi": 32,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 7
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV_WORKER' && cg.nodeQuota.nodeSpec.cpu == 16 && cg.nodeQuota.nodeSpec.memoryGi == 32)"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 7.1
- operation_id: SharedPoolService_SetHPAScaleBehavior
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:setHPAScaleBehavior",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "componentType": "COPROCESSOR_WORKER",
        "scaleDownEnabled": false
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 7.2
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "COPROCESSOR_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 16,
              "memoryGi": 32,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_coprocessor_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 8
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'COPROCESSOR_WORKER' && cg.nodeQuota.nodeSpec.cpu == 16 && cg.nodeQuota.nodeSpec.memoryGi == 32)"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 8.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 3
          },
          "storages": [
            {
              "name": "DATA",
              "type": "io2",
              "sizeGi": 50,
              "iops": 6000
            }
          ]
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_storage_data_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 9
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'PD' && cg.nodeQuota.nodeCount == 3 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 50 && s.iops == 6000 && s.type == 'io2'))"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 9.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD_TSO",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 4
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 400
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: 'scale_pd_tso_node_spec_invalid'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 10
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD_TSO",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_tso_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 10.1
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'PD_TSO' && cg.nodeQuota.nodeCount == 2 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16)"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 10.2
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD_SCHEDULING",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 4
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_scheduler_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 11
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'PD_SCHEDULING' && cg.nodeQuota.nodeCount == 4 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16)"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 11.1
- operation_id: SharedPoolService_SetHPAScaleBehavior
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:setHPAScaleBehavior",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "componentType": "TIDB_WORKER",
        "scaleDownEnabled": false
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 11.2
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIDB_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 16,
              "memoryGi": 32,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tidb_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 12
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIDB_WORKER' && cg.nodeQuota.nodeSpec.cpu == 16 && cg.nodeQuota.nodeSpec.memoryGi == 32)"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 12.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "{componentType}",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 3
          }
        },
        "force": true
      },
      "body_params": {
        "componentType": "component_type_1"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 14
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIFLASH_COMPUTE",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 1
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tiflash_compute_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 15
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV' && cg.nodeQuota.nodeCount == 3 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16) && body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_COMPUTE' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16)"
    }
  save: null
  description: 'Wait for TiKV and TiFlash compute topology to converge before scaling remote workers.'
  max_retries: 60
  delay_after: 30
  name: 'wait_tikv_tiflash_compute_topology'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 15.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 1
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tikv_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 17
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV_WORKER' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16)"
    }
  save: null
  description: 'Wait for TiKV remote worker topology to converge before scaling the coprocessor worker.'
  max_retries: 60
  delay_after: 30
  name: 'wait_tikv_worker_topology'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 17.1
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "COPROCESSOR_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 1
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_coprocessor_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 18
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 4,
              "memoryGi": 8,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 3
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 19
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD_TSO",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 4,
              "memoryGi": 8,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 2
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_tso_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 20
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "PD_SCHEDULING",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 4,
              "memoryGi": 8,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 3
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_pd_scheduler_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 21
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIDB_WORKER",
          "nodeQuota": {
            "nodeSpec": {
              "cpu": 8,
              "memoryGi": 16,
              "withLocalDisk": false,
              "localDiskSizeGi": 0
            },
            "nodeCount": 1
          }
        },
        "force": true
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'MODIFYING'"
    }
  save: null
  description: ''
  max_retries: 20
  delay_after: 30
  name: 'scale_tidb_worker_node_spec'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 22
- operation_id: SharedPoolService_GetSharedPool
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'AVAILABLE' && body.componentGroups.exists(cg, cg.componentType == 'TIKV' && cg.nodeQuota.nodeCount == 3 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 ) && body.componentGroups.exists(cg, cg.componentType == 'TIFLASH_COMPUTE' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 ) && body.componentGroups.exists(cg, cg.componentType == '{tiflash_companion_component_type}') && body.componentGroups.exists(cg, cg.componentType == 'TIKV_WORKER' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 ) && body.componentGroups.exists(cg, cg.componentType == 'COPROCESSOR_WORKER' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 ) && body.componentGroups.exists(cg, cg.componentType == 'PD' && cg.nodeQuota.nodeCount == 3 && cg.nodeQuota.nodeSpec.cpu == 4 && cg.nodeQuota.nodeSpec.memoryGi == 8 ) && body.componentGroups.exists(cg, cg.componentType == 'PD_TSO' && cg.nodeQuota.nodeCount == 2 && cg.nodeQuota.nodeSpec.cpu == 4 && cg.nodeQuota.nodeSpec.memoryGi == 8 ) && body.componentGroups.exists(cg, cg.componentType == 'PD_SCHEDULING' && cg.nodeQuota.nodeCount == 3 && cg.nodeQuota.nodeSpec.cpu == 4 && cg.nodeQuota.nodeSpec.memoryGi == 8 ) && body.componentGroups.exists(cg, cg.componentType == 'TIDB_WORKER' && cg.nodeQuota.nodeCount == 1 && cg.nodeQuota.nodeSpec.cpu == 8 && cg.nodeQuota.nodeSpec.memoryGi == 16 )"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 23
- operation_id: SharedPoolService_ApplySharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:apply",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "componentType": "{componentType}",
        "force": true
      },
      "body_params": {
        "componentType": "component_type_1"
      },
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body == {}"
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 25
- operation_id: SharedPoolService_ScaleSharedPool
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/sharedPools/{sharedPoolId}:scale",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {
        "component": {
          "componentType": "TIKV",
          "storages": [
            {
              "name": "DATA",
              "type": "gp3",
              "sizeGi": 2000,
              "iops": 8000,
              "throughputMbps": 400
            }
          ]
        },
        "force": true
      },
      "body_params": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 400
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: 'scale_tikv_storage_data'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 26
- operation_id: SharedPoolService_DeleteSharedPool
  request_type: http
  request: |-
    {
      "method": "DELETE",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {"pruneDataplane": true},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.phase == 'DELETING'"
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 27

- operation_id: SharedPoolService_WaitSharedPoolDeleted
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/sharedPools/{sharedPoolId}",
      "path_params": {
        "sharedPoolId": "sharedpool_1"
      },
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "customized",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 404
    }
  save: null
  description: 'Wait until the shared pool is fully deleted.'
  max_retries: 60
  delay_after: 30
  name: 'wait_shared_pool_deleted'
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 28

# - operation_id: SharedPoolService_ListLightweightBackups
#   # It depends on TiDB Cluster {"code":13,"message":"ListLightweightBackups failed: GetClusterIds failed: tidb group not found","details":[]}
#   request_type: http
#   # doesn't cover storage scaling now
#   request: |-
#     {
#       "method": "GET",
#       "path": "/sharedPools/{sharedPoolId}/lightweightBackups",
#       "path_params": {
#         "sharedPoolId": "sharedpool_1"
#       },
#       "headers": {},
#       "query_params": {},
#       "body": {},
#       "auth": {
#         "auth_type": "customized",
#         "content": {
#           "private_key": "placeholder",
#           "public_key": "placeholder"
#         }
#       }
#     }
#   expect: |-
#     {
#       "status_code": 200,
#       "cel": "body.totalCount >= 0"
#     }
#   save: null
#   description: ''
#   max_retries: 0
#   delay_after: 0
#   name: ''
#   continue_on_unexpected: false
#   stage: ''
#   meta: '{}'
#   generation_id: ''
#   order: 6

# body.phase == 'AVAILABLE'
# && body.componentGroups.exists(cg,
#     cg.componentType == 'TIKV'
#     && cg.nodeQuota.nodeCount == 4
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
#     && cg.storages.exists(s, s.name == 'RAFTLOG' && s.sizeGi == 100 && s.iops ==4000 && s.throughputMbs == 200 && s.type == 'io2')
#     && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 2000 && s.iops ==10000 && s.throughputMbs == 500 && s.type == 'io2')
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'TIFLASH_COMPUTE'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
#     && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 800 && s.iops == 8000 && s.throughputMbs == 1000 && s.type == 'io2')
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'TIFLASH_WRITE'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
#     && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 800 && s.iops == 8000 && s.throughputMbs == 1000 && s.type == 'io2')
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'TIKV_WORKER'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'COPROCESSOR_WORKER'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'PD'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
#     && cg.storages.exists(s, s.name == 'DATA' && s.sizeGi == 50 && s.iops == 6000 && s.throughputMbs == 8000 && s.type == 'io2')
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'PD_TSO'
#     && cg.nodeQuota.nodeCount == 4
#     && cg.nodeQuota.nodeSpec.cpu == 8
#     && cg.nodeQuota.nodeSpec.memoryGi == 16
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'PD_SCHEDULING'
#     && cg.nodeQuota.nodeCount == 4
#     && cg.nodeQuota.nodeSpec.cpu == 8
#     && cg.nodeQuota.nodeSpec.memoryGi == 16
# )
# && body.componentGroups.exists(cg,
#     cg.componentType == 'TIDB_WORKER'
#     && cg.nodeQuota.nodeCount == 2
#     && cg.nodeQuota.nodeSpec.cpu == 16
#     && cg.nodeQuota.nodeSpec.memoryGi == 32
# )
