chore: 公共 DTO 增加资源池类型
This commit is contained in:
parent
8be53b8b4e
commit
a88a5e305b
|
@ -33,7 +33,7 @@ public class KubernetesExecEngine implements ApiEngine {
|
|||
@Override
|
||||
public void execute(String command) {
|
||||
// 初始化任务
|
||||
LogUtils.info("K8s 开始执行: {}", command);
|
||||
LogUtils.info("CURL 命令:【 " + command + " 】");
|
||||
this.runApi(command);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class KubernetesProvider {
|
|||
public static void exec(TestResourceDTO resource, Object runRequest, String command) {
|
||||
try (KubernetesClient client = getKubernetesClient(resource)) {
|
||||
Pod pod = getExecPod(client, resource);
|
||||
LogUtils.info("CURL 命令:【 " + command + " 】");
|
||||
LogUtils.info("当前执行 Pod:【 " + pod.getMetadata().getName() + " 】");
|
||||
client.pods().inNamespace(client.getNamespace()).withName(pod.getMetadata().getName())
|
||||
.redirectingInput()
|
||||
.writingOutput(System.out)
|
||||
|
|
|
@ -593,7 +593,9 @@ public class ApiExecuteService {
|
|||
!commonProjectService.validateProjectResourcePool(testResourcePool, projectId)) {
|
||||
throw new MSException(ApiResultCode.EXECUTE_RESOURCE_POOL_NOT_CONFIG);
|
||||
}
|
||||
return testResourcePoolService.getTestResourcePoolDetail(resourcePoolId);
|
||||
TestResourcePoolReturnDTO poolReturnDTO = testResourcePoolService.getTestResourcePoolDetail(resourcePoolId);
|
||||
poolReturnDTO.setType(testResourcePool.getType());
|
||||
return poolReturnDTO;
|
||||
}
|
||||
|
||||
public String getProjectApiResourcePoolId(String projectId) {
|
||||
|
|
|
@ -10,6 +10,9 @@ import lombok.EqualsAndHashCode;
|
|||
public class TestResourcePoolReturnDTO extends TestResourcePool {
|
||||
private TestResourceReturnDTO testResourceReturnDTO;
|
||||
|
||||
@Schema(description = "资源池类型, Node/Kubernetes")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "资源池是否在使用中")
|
||||
private Boolean inUsed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue