修复ct申请虚拟机流程
parent
4a4161c71b
commit
e9d69a7a47
|
@ -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())){
|
||||
|
|
Loading…
Reference in New Issue