debug
parent
19bd1bc2bc
commit
3be319a59a
|
@ -40,6 +40,12 @@ public class PhysicalServerController {
|
|||
return physicalServerService.list(pager, context);
|
||||
}
|
||||
|
||||
@Operation(tags = {"CMC", "CSC"}, summary = "获取物理机列表")
|
||||
@GetMapping(value = "/listAll")
|
||||
public GeneralResult listAll() {
|
||||
return physicalServerService.listAll();
|
||||
}
|
||||
|
||||
|
||||
@Operation(tags = {"CMC", "CSC"}, summary = "添加物理机")
|
||||
@PostMapping
|
||||
|
|
|
@ -41,6 +41,7 @@ public class TianyiPhysicalProvider extends TianyiProvider {
|
|||
if (!CollectionUtils.isEmpty(zoneList)) {
|
||||
List<JSONObject> results = new ArrayList<>();
|
||||
for (JSONObject zone : zoneList) {
|
||||
log.info("zoneName:" + zone.getString("name"));
|
||||
String apiUrl = "/v4/ebm/list";
|
||||
JSONObject body = new JSONObject();
|
||||
body.put("regionID", this.getRegionId());
|
||||
|
|
|
@ -10,6 +10,7 @@ public interface PhysicalServerService {
|
|||
|
||||
|
||||
GeneralResult<GridBean<PhysicalServer>> list(Pager pager, RequestContext context);
|
||||
GeneralResult listAll();
|
||||
|
||||
|
||||
GeneralResult<PhysicalServer> detail(Long id);
|
||||
|
|
|
@ -79,6 +79,14 @@ public class PhysicalServerServiceImpl implements PhysicalServerService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeneralResult listAll() {
|
||||
CloudVendor vendor = cloudVendorRepository.query(1L);
|
||||
TianyiPhysicalProvider physicalProvider = new TianyiPhysicalProvider(butlerConfig.regionButler(vendor.getUuid(), "2022guizhou_syj"));
|
||||
GeneralResult result = physicalProvider.list();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeneralResult<PhysicalServer> detail(Long id) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue