diff --git a/bocloud.ims.service/src/main/java/com/bocloud/ims/service/resource/VMApplyServiceImpl.java b/bocloud.ims.service/src/main/java/com/bocloud/ims/service/resource/VMApplyServiceImpl.java index a4eda74..bfc7e69 100644 --- a/bocloud.ims.service/src/main/java/com/bocloud/ims/service/resource/VMApplyServiceImpl.java +++ b/bocloud.ims.service/src/main/java/com/bocloud/ims/service/resource/VMApplyServiceImpl.java @@ -249,6 +249,21 @@ public class VMApplyServiceImpl implements VMApplyService { Assert.notNull(vendor, "云平台不存在"); CloudProvider provider = CloudProvider.valueOf(vendor.getType()); + + if (provider == CloudProvider.CLOUDTOWER) { + //适配cloudTower + AssignParam assignParam = new AssignParam(); + assignParam.setOriginalConfigs(configs); + assignParam.setCpu(configs.getLong("cpu")); + assignParam.setMemory(configs.getBigDecimal("memory").longValue()); + assignParam.setDisk(configs.getLong("disk")); + assignParam.setTemplateDisk(configs.getLong("templateDisk")); + assignParam.setInstance(count); + assignParam.setUuid(UUID.randomUUID().toString()); + assignParam.setPoolGroupId(param.getLocation().getPoolGroupId()); + param.setAssignParam(assignParam); + } + if (CloudProvider.HUAWEI == provider){ String instanceChargeType = "PostPaid"; if (ChargeCommon.ChargeMode.PreCharge.equals(order.getChargeMode())){