From 68eed7997aab4aa4f785085303aab61cf8e16a31 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 13 Oct 2021 16:01:51 +0100 Subject: Make Service base type optional Issue-ID: SDC-3759 Change-Id: I8adf112966ee9303fc965a74cec7203274acd735 Signed-off-by: andre.schmid --- .../sdc/backend/ci/tests/datatypes/ServiceReqDetails.java | 13 ++++++++++++- .../ci/tests/utils/general/OnboardingUtillViaApis.java | 5 +++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'integration-tests/src/test/java/org') diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/ServiceReqDetails.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/ServiceReqDetails.java index b18d5da982..e7a22d98a1 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/ServiceReqDetails.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/ServiceReqDetails.java @@ -22,6 +22,8 @@ package org.onap.sdc.backend.ci.tests.datatypes; import java.util.ArrayList; import java.util.Collections; +import lombok.Getter; +import lombok.Setter; import org.onap.sdc.backend.ci.tests.datatypes.enums.ServiceInstantiationType; import org.onap.sdc.frontend.ci.tests.datatypes.ModelName; import org.openecomp.sdc.be.model.Service; @@ -35,6 +37,14 @@ public class ServiceReqDetails extends ComponentReqDetails { protected Boolean ecompGeneratedNaming = true; protected String instantiationType = ServiceInstantiationType.A_LA_CARTE.getValue(); protected String serviceFunction = ""; + @Getter + @Setter + private String derivedFromGenericType; + @Getter + @Setter + private String derivedFromGenericVersion; + + public String getServiceType() { return serviceType; @@ -110,8 +120,9 @@ public class ServiceReqDetails extends ComponentReqDetails { this.uniqueId = service.getUniqueId(); this.UUID = service.getUUID(); this.version = service.getVersion(); + this.derivedFromGenericType = service.getDerivedFromGenericType(); + this.derivedFromGenericVersion = service.getDerivedFromGenericVersion(); this.models = Collections.singletonList(service.getModel()); - } public ServiceReqDetails() { diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/OnboardingUtillViaApis.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/OnboardingUtillViaApis.java index 197daba4c0..5da273aeea 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/OnboardingUtillViaApis.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/OnboardingUtillViaApis.java @@ -156,13 +156,14 @@ public class OnboardingUtillViaApis { } public static ServiceReqDetails prepareServiceDetailsBeforeCreate(User user) { - ServiceReqDetails serviceDetails = ElementFactory.getDefaultService(ServiceCategoriesEnum.NETWORK_L4, user); serviceDetails.setServiceType("MyServiceType"); serviceDetails.setServiceRole("MyServiceRole"); serviceDetails.setNamingPolicy("MyServiceNamingPolicy"); serviceDetails.setEcompGeneratedNaming(false); - + serviceDetails.setDerivedFromGenericType("org.openecomp.resource.abstract.nodes.service"); + serviceDetails.setDerivedFromGenericVersion("1.0"); + return serviceDetails; } } -- cgit 1.2.3-korg