|
|
@ -370,14 +370,14 @@ public class JCloudUtil {
|
|
|
|
createCloudHostDto.setUsername(CommonConstants.DEFAULT_ROOT);
|
|
|
|
createCloudHostDto.setUsername(CommonConstants.DEFAULT_ROOT);
|
|
|
|
createCloudHostDto.setPassword(CommonConstants.DEFAULT_PASSWORD);
|
|
|
|
createCloudHostDto.setPassword(CommonConstants.DEFAULT_PASSWORD);
|
|
|
|
|
|
|
|
|
|
|
|
// 休眠30s再更新密码
|
|
|
|
// // 休眠30s再更新密码
|
|
|
|
SleepUtil.sleep(30 * 1000);
|
|
|
|
// SleepUtil.sleep(30 * 1000);
|
|
|
|
|
|
|
|
//
|
|
|
|
log.info("开始执行修改云主机:{} 密码", serverId);
|
|
|
|
// log.info("开始执行修改云主机:{} 密码", serverId);
|
|
|
|
boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123");
|
|
|
|
// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123");
|
|
|
|
if (!changePwdStatus) {
|
|
|
|
// if (!changePwdStatus) {
|
|
|
|
log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId);
|
|
|
|
// log.error("oneStepCreateCloudHost serverId:{}密码修改失败", serverId);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
return createCloudHostDto;
|
|
|
|
return createCloudHostDto;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -418,12 +418,12 @@ public class JCloudUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.info("重置云主机成功:serverId:{},", resetCloudHostParam.getServerId());
|
|
|
|
log.info("重置云主机成功:serverId:{},", resetCloudHostParam.getServerId());
|
|
|
|
|
|
|
|
|
|
|
|
SleepUtil.sleep(50 * 1000);
|
|
|
|
// SleepUtil.sleep(50 * 1000);
|
|
|
|
log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId);
|
|
|
|
// log.info("oneStepRebuildCloudHost 开始执行修改云主机:{} 密码", serverId);
|
|
|
|
boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123");
|
|
|
|
// boolean changePwdStatus = changePassword(apiToken, serverId, "Educoder123");
|
|
|
|
if (!changePwdStatus) {
|
|
|
|
// if (!changePwdStatus) {
|
|
|
|
log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId);
|
|
|
|
// log.error("oneStepRebuildCloudHost serverId:{}密码修改失败", serverId);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.info("rebuild与主机完成serverId:{}", serverId);
|
|
|
|
log.info("rebuild与主机完成serverId:{}", serverId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|