From b8e2faf476202b6ffe61bc3a9a37df1304881d40 Mon Sep 17 00:00:00 2001 From: Avi Ziv Date: Tue, 18 Jul 2017 19:45:38 +0300 Subject: [SDC] Onboarding 1710 rebase. Change-Id: If3b6b81d221fde13908f1e8160db6f7d9433c535 Signed-off-by: Avi Ziv --- .../java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java index 922700671c..1612c964a1 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java @@ -36,12 +36,14 @@ import org.openecomp.sdc.versioning.dao.types.Version; import org.openecomp.sdc.versioning.types.VersionableEntityAction; import org.openecomp.sdcrests.vendorsoftwareproducts.types.CompositionEntityResponseDto; import org.openecomp.sdcrests.vendorsoftwareproducts.types.CompositionEntityValidationDataDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.NicCreationResponseDto; import org.openecomp.sdcrests.vendorsoftwareproducts.types.NicDto; import org.openecomp.sdcrests.vendorsoftwareproducts.types.NicRequestDto; import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto; import org.openecomp.sdcrests.vsp.rest.Nics; import org.openecomp.sdcrests.vsp.rest.mapping.MapCompositionEntityResponseToDto; import org.openecomp.sdcrests.vsp.rest.mapping.MapCompositionEntityValidationDataToDto; +import org.openecomp.sdcrests.vsp.rest.mapping.MapNicEntityToNicCreationResponseDto; import org.openecomp.sdcrests.vsp.rest.mapping.MapNicEntityToNicDto; import org.openecomp.sdcrests.vsp.rest.mapping.MapNicRequestDtoToNicEntity; import org.openecomp.sdcrests.vsp.rest.mapping.MapNicToNicDto; @@ -89,7 +91,11 @@ public class NicsImpl implements Nics { componentManager.validateComponentExistence(vspId, nic.getVersion(), componentId, user); NicEntity createdNic = nicManager.createNic(nic, user); - return Response.ok(createdNic != null ? new StringWrapperResponse(createdNic.getId()) : null) + MapNicEntityToNicCreationResponseDto mapping = + new MapNicEntityToNicCreationResponseDto(); + NicCreationResponseDto createdNicDto = mapping.applyMapping(createdNic, + NicCreationResponseDto.class); + return Response.ok(createdNic != null ? createdNicDto : null) .build(); } -- cgit 1.2.3-korg