物理机可用规格查询

iida
yuemian 2024-09-03 11:12:37 +08:00
parent aeb319b039
commit 2110cc845d
2 changed files with 3 additions and 2 deletions

View File

@ -76,7 +76,7 @@ public class TianyiFlavorProvider extends TianyiServerProvider {
}
}
public GeneralResult listPhysical(String regionId, String azName) {
public GeneralResult listFlavorPhysical(String regionId, String azName) {
try {
String apiUrl = "/v4/ebm/device-type-list";
JSONObject body = new JSONObject();
@ -96,4 +96,5 @@ public class TianyiFlavorProvider extends TianyiServerProvider {
return new GeneralResult(false, "查询物理机规格列表失败", e.getMessage());
}
}
}

View File

@ -165,7 +165,7 @@ public class FlavorServiceImpl implements FlavorService {
return GeneralResult.FAILED("云平台不存在");
}
TianyiFlavorProvider flavorProvider = new TianyiFlavorProvider(butlerConfig.regionButler(vendor.getUuid(), regionId));
return flavorProvider.listPhysical(regionId, zoneId);
return flavorProvider.listFlavorPhysical(regionId, zoneId);
} catch (Exception e) {
log.error("查询物理机规格失败"+ e.getMessage(), e);
return GeneralResult.FAILED("查询物理机规格失败"+ e.getMessage());