From af128e72de41e8ae2e1691ff139527bf316fa549 Mon Sep 17 00:00:00 2001 From: youys <1272586223@qq.com> Date: Thu, 8 Sep 2022 13:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E5=86=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../educoder/service/CloudHostService.java | 2 +- .../java/net/educoder/util/JCloudUtil.java | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/educoder/service/CloudHostService.java b/src/main/java/net/educoder/service/CloudHostService.java index b600f7f..5db418f 100644 --- a/src/main/java/net/educoder/service/CloudHostService.java +++ b/src/main/java/net/educoder/service/CloudHostService.java @@ -57,7 +57,7 @@ public class CloudHostService { private int index = 0; - private List networkIdList; + private volatile List networkIdList; /** * 创建云主机 diff --git a/src/main/java/net/educoder/util/JCloudUtil.java b/src/main/java/net/educoder/util/JCloudUtil.java index ada2747..800b8db 100644 --- a/src/main/java/net/educoder/util/JCloudUtil.java +++ b/src/main/java/net/educoder/util/JCloudUtil.java @@ -370,14 +370,14 @@ public class JCloudUtil { createCloudHostDto.setUsername(CommonConstants.DEFAULT_ROOT); createCloudHostDto.setPassword(CommonConstants.DEFAULT_PASSWORD); - // 休眠30s再更新密码 - SleepUtil.sleep(30 * 1000); - - log.info("开始执行修改云主机:{} 密码", serverId); - boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); - if (!changePwdStatus) { - log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId); - } +// // 休眠30s再更新密码 +// SleepUtil.sleep(30 * 1000); +// +// log.info("开始执行修改云主机:{} 密码", serverId); +// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); +// if (!changePwdStatus) { +// log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId); +// } return createCloudHostDto; } @@ -418,12 +418,12 @@ public class JCloudUtil { } log.info("重置云主机成功:serverId:{},", resetCloudHostParam.getServerId()); - SleepUtil.sleep(50 * 1000); - log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId); - boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); - if (!changePwdStatus) { - log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId); - } +// SleepUtil.sleep(50 * 1000); +// log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId); +// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123"); +// if (!changePwdStatus) { +// log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId); +// } } log.info("rebuild与主机完成serverId:{}", serverId); }