Deployments.ts 7.0 KB
Newer Older
R
Rongfeng Fu 已提交
1 2 3 4
// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

R
Rongfeng Fu 已提交
5 6
/** Get Deployments get deployment GET /api/v1/deployments */
export async function getDeployment(
R
Rongfeng Fu 已提交
7
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
R
Rongfeng Fu 已提交
8
  params: API.getDeploymentParams,
R
Rongfeng Fu 已提交
9 10 11 12 13 14 15 16 17 18 19
  options?: { [key: string]: any },
) {
  return request<API.OBResponseDataListDeployment_>('/api/v1/deployments', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

R
Rongfeng Fu 已提交
20 21 22 23 24 25 26 27 28
/** Get Destroy Task Info get destroy task info GET /api/v1/deployments_test */
export async function getDestroyTaskInfo_2(options?: { [key: string]: any }) {
  return request<API.OBResponse>('/api/v1/deployments_test', {
    method: 'GET',
    ...(options || {}),
  });
}

/** Get Deployment query deployment config GET /api/v1/deployments/${param0} */
R
Rongfeng Fu 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
export async function queryDeploymentConfig(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryDeploymentConfigParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseDeploymentInfo_>(
    `/api/v1/deployments/${param0}`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** Create Deployment create deployment config POST /api/v1/deployments/${param0} */
export async function createDeploymentConfig(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.createDeploymentConfigParams,
  body: API.DeploymentConfig,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponse>(`/api/v1/deployments/${param0}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

R
Rongfeng Fu 已提交
64 65
/** Destroy Deployment destroy deployment DELETE /api/v1/deployments/${param0} */
export async function destroyDeployment(
R
Rongfeng Fu 已提交
66
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
R
Rongfeng Fu 已提交
67
  params: API.destroyDeploymentParams,
R
Rongfeng Fu 已提交
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponse>(`/api/v1/deployments/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** Get Connect Info query connect info GET /api/v1/deployments/${param0}/connection */
export async function queryConnectionInfo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryConnectionInfoParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseDataListConnectionInfo_>(
    `/api/v1/deployments/${param0}/connection`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** Get Destroy Task Info get destroy task info GET /api/v1/deployments/${param0}/destroy */
export async function getDestroyTaskInfo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDestroyTaskInfoParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseTaskInfo_>(
    `/api/v1/deployments/${param0}/destroy`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** Get Install Status query install status GET /api/v1/deployments/${param0}/install */
export async function queryInstallStatus(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryInstallStatusParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseTaskInfo_>(
    `/api/v1/deployments/${param0}/install`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

R
Rongfeng Fu 已提交
129 130
/** Install deploy and start a deployment POST /api/v1/deployments/${param0}/install */
export async function deployAndStartADeployment(
R
Rongfeng Fu 已提交
131
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
R
Rongfeng Fu 已提交
132
  params: API.deployAndStartADeploymentParams,
R
Rongfeng Fu 已提交
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponse>(`/api/v1/deployments/${param0}/install`, {
    method: 'POST',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** Get Install Log query install log GET /api/v1/deployments/${param0}/install/log */
export async function queryInstallLog(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryInstallLogParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseInstallLog_>(
    `/api/v1/deployments/${param0}/install/log`,
    {
      method: 'GET',
      params: {
        ...queryParams,
      },
      ...(options || {}),
    },
  );
}

/** Get Pre Check Status select pre-check status by pre deployment name GET /api/v1/deployments/${param0}/precheck */
export async function preCheckStatus(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.preCheckStatusParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponsePreCheckResult_>(
    `/api/v1/deployments/${param0}/precheck`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** Pre Check pre-check, asynchronous process POST /api/v1/deployments/${param0}/precheck */
export async function preCheck(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.preCheckParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponse>(`/api/v1/deployments/${param0}/precheck`, {
    method: 'POST',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** Recover recover POST /api/v1/deployments/${param0}/recover */
export async function recover(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.recoverParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseDataListRecoverChangeParameter_>(
    `/api/v1/deployments/${param0}/recover`,
    {
      method: 'POST',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** Get Deployment Report query deployment report GET /api/v1/deployments/${param0}/report */
export async function queryDeploymentReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryDeploymentReportParams,
  options?: { [key: string]: any },
) {
  const { name: param0, ...queryParams } = params;
  return request<API.OBResponseDataListDeploymentReport_>(
    `/api/v1/deployments/${param0}/report`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}