diff options
author | 2021-01-14 10:24:04 +0000 | |
---|---|---|
committer | 2021-01-25 15:37:07 +0000 | |
commit | e957e1d17713b2c64c1f4fae6681fa1aef3f5e0f (patch) | |
tree | ff00c199f9fbdb894b0e13277bfca2991440ce9b /plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main | |
parent | 9375b0b907842956052d003bb6a6796ee994572f (diff) |
Upgrading current ETSI CSIT to latest honolulu
version
Change-Id: I37ea7cffcc8a1cee1752825e23e52771669e7c51
Issue-ID: INT-1837
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main')
3 files changed, 50 insertions, 6 deletions
diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/model/Vnfds.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/model/Vnfds.java index cf550067..6fe696ee 100644 --- a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/model/Vnfds.java +++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/model/Vnfds.java @@ -31,6 +31,17 @@ public class Vnfds { public void setVnfcList(final List<Vnfc> vnfclist) { this.vnfclist = vnfclist; } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Vnfd {\n"); + sb.append(" vnfdId: ").append(vnfdId).append("\n"); + sb.append(" vnfclist: ").append(vnfclist).append("\n"); + sb.append("}"); + return sb.toString(); + } + } @@ -82,8 +93,20 @@ public class Vnfds { this.grantResourceId = grantResourceId; } - } + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Vnfc {\n"); + sb.append(" vnfcId: ").append(vnfcId).append("\n"); + sb.append(" type: ").append(type).append("\n"); + sb.append(" vduId: ").append(vduId).append("\n"); + sb.append(" resourceTemplateId: ").append(resourceTemplateId).append("\n"); + sb.append(" grantResourceId: ").append(grantResourceId).append("\n"); + sb.append("}"); + return sb.toString(); + } + } public List<Vnfd> getVnfdList() { return vnfdList; @@ -94,4 +117,15 @@ public class Vnfds { this.vnfdList = vnfdList; } + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class Vnfds {\n"); + sb.append(" vnfdList: ").append(vnfdList).append("\n"); + sb.append("}"); + return sb.toString(); + } + + + } diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/InstantiateOperationProgressor.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/InstantiateOperationProgressor.java index 0a5444b9..6b483548 100644 --- a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/InstantiateOperationProgressor.java +++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/InstantiateOperationProgressor.java @@ -40,9 +40,10 @@ public class InstantiateOperationProgressor extends OperationProgressor { @Override protected List<GrantsAddResources> getAddResources(final String vnfdId) { final List<GrantsAddResources> resources = new ArrayList<>(); - + LOGGER.info("Will find GrantsAddResources for vnfdId: {}", vnfdId); for (final Vnfd vnfd : vnfds.getVnfdList()) { if (vnfd.getVnfdId().equals(vnfdId)) { + LOGGER.info("Found vnfd: {}", vnfd); for (final Vnfc vnfc : vnfd.getVnfcList()) { final GrantsAddResources addResource = new GrantsAddResources(); vnfc.setGrantResourceId(UUID.randomUUID().toString()); @@ -80,9 +81,12 @@ public class InstantiateOperationProgressor extends OperationProgressor { addResource.getVimConnectionId()); } LOGGER.info("VIM connections in grant response: {}", mapOfGrantResourceIdToVimConnectionId); + final String vnfInstanceId = operation.getVnfInstanceId(); + + LOGGER.info("vnfds: {}", vnfds); for (final Vnfd vnfd : vnfds.getVnfdList()) { - if (vnfd.getVnfdId().equals(svnfmService.getVnf(operation.getVnfInstanceId()).getVnfdId())) { + if (vnfd.getVnfdId().equals(svnfmService.getVnf(vnfInstanceId).getVnfdId())) { for (final Vnfc vnfc : vnfd.getVnfcList()) { final InlineResponse201InstantiatedVnfInfoVnfcResourceInfo vnfcResourceInfoItem = new InlineResponse201InstantiatedVnfInfoVnfcResourceInfo(); diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/TerminateOperationProgressor.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/TerminateOperationProgressor.java index bd729f3a..9257e49f 100644 --- a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/TerminateOperationProgressor.java +++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/TerminateOperationProgressor.java @@ -12,12 +12,15 @@ import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOpera import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum; import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoResourceHandle; import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoVnfcResourceInfo; -import org.onap.so.svnfm.simulator.model.Vnfds; -import org.onap.so.svnfm.simulator.repository.VnfOperationRepository; import org.onap.so.svnfm.simulator.config.ApplicationConfig; import org.onap.so.svnfm.simulator.model.VnfOperation; +import org.onap.so.svnfm.simulator.model.Vnfds; +import org.onap.so.svnfm.simulator.repository.VnfOperationRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class TerminateOperationProgressor extends OperationProgressor { + private static final Logger LOGGER = LoggerFactory.getLogger(TerminateOperationProgressor.class); public TerminateOperationProgressor(final VnfOperation operation, final SvnfmService svnfmService, final VnfOperationRepository vnfOperationRepository, final ApplicationConfig applicationConfig, @@ -33,9 +36,12 @@ public class TerminateOperationProgressor extends OperationProgressor { @Override protected List<GrantsAddResources> getRemoveResources(final String vnfdId) { final List<GrantsAddResources> resources = new ArrayList<>(); + LOGGER.info("Will find RemoveResources for vnfdId: {}", vnfdId); + final String vnfInstanceId = operation.getVnfInstanceId(); final org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201 vnf = - svnfmService.getVnf(operation.getVnfInstanceId()); + svnfmService.getVnf(vnfInstanceId); + LOGGER.info("Found InlineResponse201: {} for vnfInstanceId: {}", vnf, vnfInstanceId); for (final InlineResponse201InstantiatedVnfInfoVnfcResourceInfo vnfc : vnf.getInstantiatedVnfInfo() .getVnfcResourceInfo()) { final GrantsAddResources addResource = new GrantsAddResources(); |