diff options
Diffstat (limited to 'esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java')
-rw-r--r-- | esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java index bc7e872..7545b01 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/wrapper/VimManagerWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2018 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.util.List; import javax.ws.rs.core.Response; import org.onap.aai.esr.entity.aai.CloudRegionDetail; import org.onap.aai.esr.entity.aai.CloudRegionList; +import org.onap.aai.esr.entity.aai.ComplexList; import org.onap.aai.esr.entity.aai.EsrSystemInfo; import org.onap.aai.esr.entity.rest.VimRegisterInfo; import org.onap.aai.esr.entity.rest.VimRegisterResponse; @@ -214,4 +215,20 @@ public class VimManagerWrapper { } return cloudRegionDetail; } + + public Response queryComplexes() { + ComplexList complexList = new ComplexList(); + List<String> complexId = new ArrayList<>(); + try { + String complexesString = cloudRegionProxy.qureyComplexes(); + LOG.info("The complex query result is: " + complexesString); + complexList = new Gson().fromJson(complexesString, ComplexList.class); + for (int i=0; i<complexList.getComplex().size(); i++) { + complexId.add(complexList.getComplex().get(i).getPhysicalLocationId()); + } + } catch (ExtsysException e) { + LOG.error("Query vim details by ID failed !", e); + } + return Response.ok(complexId).build(); + } } |