summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features.properties.md6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java57
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/properties/Features.java2
-rw-r--r--vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties1
-rw-r--r--vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties1
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java124
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json2
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java9
-rw-r--r--vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json1
-rw-r--r--vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json10
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java14
-rw-r--r--vid-automation/src/test/resources/features.properties1
-rw-r--r--vid-ext-services-simulator/src/main/resources/download_files/csar15782222_invariantUUIDMacro.zipbin27791 -> 38626 bytes
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts1
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts4
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts1
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts1
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts12
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts1
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts1
35 files changed, 172 insertions, 96 deletions
diff --git a/features.properties.md b/features.properties.md
index 1f9feccf7..45d5922c7 100644
--- a/features.properties.md
+++ b/features.properties.md
@@ -183,4 +183,8 @@
Any a-la-carte new service deployment will be open in modern UI, besides excluded services : Port mirroring, VLAN Tagging
* FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS
- When flag is true the new popup will be opened with additional options to perform on VFM. \ No newline at end of file
+ When flag is true the new popup will be opened with additional options to perform on VFM.
+
+* FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND,
+ When flag is true, VID use macro_services_by_invariant_uuid.json file to identify if csar without instantiation type is macro service.
+ Otherwise, MACRO_SERVICES list in vidConfiguration.js is used to identify if it's a macro service (in ng1 code)
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
index 3f18a5ace..760eb4251 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
@@ -24,6 +24,7 @@ import static java.util.stream.Collectors.toSet;
import static org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase;
import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.hibernate.annotations.common.util.StringHelper.isNotEmpty;
import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
import com.google.common.collect.ImmutableMap;
@@ -42,6 +43,7 @@ import org.onap.sdc.toscaparser.api.elements.Metadata;
import org.onap.vid.exceptions.GenericUncheckedException;
import org.onap.vid.model.ServiceModel;
import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.VidNotions.InstantiationType;
import org.onap.vid.model.VidNotions.InstantiationUI;
import org.onap.vid.model.VidNotions.ModelCategory;
import org.onap.vid.properties.Features;
@@ -78,11 +80,13 @@ public class VidNotionsBuilder {
VidNotions buildVidNotions(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
VidNotions.ModelCategory modelCategory = suggestModelCategory(csarHelper, serviceModel);
+ final InstantiationType instantiationType = suggestInstantiationType(serviceModel, modelCategory);
return new VidNotions(
- suggestInstantiationUI(csarHelper, serviceModel, modelCategory),
+ suggestInstantiationUI(csarHelper, serviceModel, modelCategory, instantiationType),
modelCategory,
- suggestViewEditUI(csarHelper, serviceModel, modelCategory),
- suggestInstantiationType(serviceModel, modelCategory));
+ suggestViewEditUI(csarHelper, serviceModel, modelCategory, instantiationType),
+ instantiationType
+ );
}
private boolean isMacroTypeByModelCategory(VidNotions.ModelCategory modelCategory) {
@@ -91,34 +95,47 @@ public class VidNotionsBuilder {
return (featureOfMacroType!=null && featureManager.isActive(featureOfMacroType));
}
- VidNotions.InstantiationType suggestInstantiationType(ServiceModel serviceModel, VidNotions.ModelCategory modelCategory) {
+ InstantiationType suggestInstantiationType(ServiceModel serviceModel, VidNotions.ModelCategory modelCategory) {
if (isMacroTypeByModelCategory(modelCategory)) {
- return VidNotions.InstantiationType.Macro;
+ return InstantiationType.Macro;
}
- if (serviceModel==null || serviceModel.getService()==null || isEmpty(serviceModel.getService().getInstantiationType())) {
- return VidNotions.InstantiationType.ClientConfig;
+ if (serviceModel==null || serviceModel.getService()==null) {
+ return defaultInstantiationType();
}
- String instantiationType = serviceModel.getService().getInstantiationType();
- if (instantiationType.equals(ToscaParserImpl2.Constants.MACRO)) {
- return VidNotions.InstantiationType.Macro;
+
+ if (StringUtils.equals(serviceModel.getService().getInstantiationType(), ToscaParserImpl2.Constants.MACRO)) {
+ return InstantiationType.Macro;
}
- if (instantiationType.equals(ToscaParserImpl2.Constants.A_LA_CARTE)) {
- return VidNotions.InstantiationType.ALaCarte;
+
+ if (StringUtils.equals(serviceModel.getService().getInstantiationType(), ToscaParserImpl2.Constants.A_LA_CARTE)) {
+ return InstantiationType.ALaCarte;
}
- return VidNotions.InstantiationType.ClientConfig;
+ if (!featureManager.isActive(Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND))
+ return InstantiationType.ClientConfig;
+
+ return isMacroByInvariantUuid(serviceModel.getService().getInvariantUuid()) ?
+ InstantiationType.Macro :
+ InstantiationType.ALaCarte;
+ }
+
+ @NotNull
+ private InstantiationType defaultInstantiationType() {
+ return featureManager.isActive(Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND) ?
+ InstantiationType.ALaCarte :
+ InstantiationType.ClientConfig;
}
//UI route a-la-carte services to old UI only if InstantiationUI is LEGACY
//So any other value for InstantiationUI other than LEGACY make UI to route
//a-la-carte services to new UI
- VidNotions.InstantiationUI suggestInstantiationUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel, ModelCategory modelCategory) {
+ VidNotions.InstantiationUI suggestInstantiationUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel, ModelCategory modelCategory, InstantiationType instantiationType) {
if(featureManager.isActive(Features.FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI) && isALaCarte(csarHelper)) {
return VidNotions.InstantiationUI.ANY_ALACARTE_NEW_UI;
}
if (featureManager.isActive(Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI) &&
- !isMacro(serviceModel) &&
+ !isMacro(instantiationType) &&
!isAlacarteExcludedByCategory(modelCategory)) {
return InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED;
}
@@ -206,13 +223,13 @@ public class VidNotionsBuilder {
return VidNotions.ModelCategory.OTHER;
}
- VidNotions.InstantiationUI suggestViewEditUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel, ModelCategory modelCategory) {
+ VidNotions.InstantiationUI suggestViewEditUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel, ModelCategory modelCategory, InstantiationType instantiationType) {
if (featureManager.isActive(Features.FLAG_1902_VNF_GROUPING) && isGrouping(csarHelper)) {
return VidNotions.InstantiationUI.SERVICE_WITH_VNF_GROUPING;
}
if (featureManager.isActive(Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT) &&
- isMacro(serviceModel) &&
+ isMacro(instantiationType) &&
!isTransportService(csarHelper) &&
//till new view/edit would support fabric service activation
!hasFabricConfiguration(csarHelper)) {
@@ -220,7 +237,7 @@ public class VidNotionsBuilder {
}
if (featureManager.isActive(Features.FLAG_1902_NEW_VIEW_EDIT)) {
- VidNotions.InstantiationUI instantiationUISuggestion = suggestInstantiationUI(csarHelper, serviceModel, modelCategory);
+ VidNotions.InstantiationUI instantiationUISuggestion = suggestInstantiationUI(csarHelper, serviceModel, modelCategory, instantiationType);
if (instantiationUISuggestion!=VidNotions.InstantiationUI.LEGACY) {
return instantiationUISuggestion;
}
@@ -229,8 +246,8 @@ public class VidNotionsBuilder {
return VidNotions.InstantiationUI.LEGACY;
}
- private boolean isMacro(ServiceModel serviceModel) {
- return ToscaParserImpl2.Constants.MACRO.equals(serviceModel.getService().getInstantiationType());
+ private boolean isMacro(InstantiationType instantiationType) {
+ return instantiationType==InstantiationType.Macro;
}
private boolean isUuidExactlyHardCoded1ffce89fef3f(ISdcCsarHelper csarHelper) {
diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
index 232484ba9..d6d7a6aa2 100644
--- a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
+++ b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
@@ -29,7 +29,6 @@ public enum Features implements Feature {
* Use /docs/feature-flags.md for details
*/
- EMPTY_DRAWING_BOARD_TEST,
FLAG_ADD_MSO_TESTAPI_FIELD,
FLAG_SERVICE_MODEL_CACHE,
FLAG_NETWORK_TO_ASYNC_INSTANTIATION,
@@ -81,6 +80,7 @@ public enum Features implements Feature {
FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE,
FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI,
FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS,
+ FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND,
;
diff --git a/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties b/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
index d5d2ead44..7baa08690 100644
--- a/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
+++ b/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
@@ -1,6 +1,5 @@
FLAG_ENABLE_WEBPACK_MODERN_UI = true
FLAG_ASYNC_JOBS = true
-EMPTY_DRAWING_BOARD_TEST = false
FLAG_ADD_MSO_TESTAPI_FIELD = true
FLAG_UNASSIGN_SERVICE = true
FLAG_COLLECTION_RESOURCE_SUPPORT = true
diff --git a/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties b/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
index 29672bcd6..1f7244c3d 100644
--- a/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
+++ b/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
@@ -21,7 +21,6 @@ FLAG_SHOW_ORCHESTRATION_TYPE = false
FLAG_COLLECTION_RESOURCE_SUPPORT = false
FLAG_ENABLE_WEBPACK_MODERN_UI = false
FLAG_ASYNC_JOBS = false
-EMPTY_DRAWING_BOARD_TEST = false
FLAG_NETWORK_TO_ASYNC_INSTANTIATION = false
FLAG_DUPLICATE_VNF = false
FLAG_DEFAULT_VNF = false
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
index c32dd2141..0f6f25c7b 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
@@ -74,6 +74,9 @@ import org.togglz.core.manager.FeatureManager;
public class VidNotionsBuilderTest {
+ private static final String MACRO_SERVICE_INVARIANT_UUID = "2efab359-cdd4-4da2-9b79-61df990796c2";
+ private static final String NOT_MACRO_SERVICE_INVARIANT_UUID = "5d854f6b-759c-4aa6-b472-7e4bb1c003d4";
+
@InjectMocks
VidNotionsBuilder vidNotionsBuilder;
@@ -98,7 +101,7 @@ public class VidNotionsBuilderTest {
public void VLNetworkWithPropertyNetworkTechnologyOVS_UIHintIsPositive() {
ISdcCsarHelper csarHelper = mockForNonLegacyInstantiationUI();
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ALaCarte), is(InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS));
assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel) , is(ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL));
}
@@ -119,20 +122,87 @@ public class VidNotionsBuilderTest {
}
@DataProvider
+ public static Object[][] identifyInvariantFeatureFlagDataProvider() {
+ return new Object[][] {
+ {false, null, InstantiationType.ClientConfig},
+ {false, mock(ServiceModel.class), InstantiationType.ClientConfig},
+ {true, null, InstantiationType.ALaCarte},
+ {true, mock(ServiceModel.class), InstantiationType.ALaCarte},
+ };
+ }
+
+ @Test(dataProvider = "identifyInvariantFeatureFlagDataProvider")
+ public void whenCsarIsEmpty_suggestInstantiationType_byFeatureFlag(
+ boolean isFlagActive, ServiceModel serviceModel, InstantiationType expectedType) {
+ when(featureManagerMock.isActive(Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND)).thenReturn(isFlagActive);
+ if (serviceModel!=null) {
+ when(serviceModel.getService()).thenReturn(null);
+ }
+ assertEquals(expectedType, vidNotionsBuilder.suggestInstantiationType(serviceModel, null));
+ }
+
+ @DataProvider
+ public static Object[][] noMacroNoAlaCarteDataProvider() {
+ return new Object[][] {
+ {Constants.CLIENT_CONFIG},
+ {"don't know you"},
+ {null},
+ };
+ }
+
+ @Test(dataProvider = "noMacroNoAlaCarteDataProvider")
+ public void givenNoMacroNorALaCarte_when_FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND_isOff_then_suggestInstantiationType_ClientConfig(String instantiationType) {
+ ServiceModel serviceModel = mockServiceModelInstantiationTypeAndInvariant(MACRO_SERVICE_INVARIANT_UUID, instantiationType);
+ when(featureManagerMock.isActive(Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND)).thenReturn(false);
+ assertEquals(InstantiationType.ClientConfig , vidNotionsBuilder.suggestInstantiationType(serviceModel, null));
+ }
+
+ @NotNull
+ private ServiceModel mockServiceModelInstantiationTypeAndInvariant(String invariantUUID, String instantiationType) {
+ ServiceModel serviceModel = mock(ServiceModel.class);
+ Service service = mock(Service.class);
+ when(serviceModel.getService()).thenReturn(service);
+ when(service.getInstantiationType()).thenReturn(instantiationType);
+ when(service.getInvariantUuid()).thenReturn(invariantUUID);
+ return serviceModel;
+ }
+
+ @DataProvider
+ public static Object[][] instantiationTypeByInvariantDataProvider() {
+ return new Object[][] {
+ {null, MACRO_SERVICE_INVARIANT_UUID, InstantiationType.Macro},
+ {null, NOT_MACRO_SERVICE_INVARIANT_UUID, InstantiationType.ALaCarte},
+ {Constants.CLIENT_CONFIG, MACRO_SERVICE_INVARIANT_UUID, InstantiationType.Macro},
+ {Constants.BOTH, NOT_MACRO_SERVICE_INVARIANT_UUID, InstantiationType.ALaCarte},
+ };
+ }
+
+ @Test(dataProvider = "instantiationTypeByInvariantDataProvider")
+ public void givenNoMacroNorALaCarte_givenFlagIsOn_suggestInstantiationTypeByInvariant(
+ String givenInstantiationType, String invariantUUID, InstantiationType expectedType
+ ) {
+ when(featureManagerMock.isActive(Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND)).thenReturn(true);
+ ServiceModel serviceModel = mockServiceModelInstantiationTypeAndInvariant(invariantUUID, givenInstantiationType);
+ assertEquals(expectedType, vidNotionsBuilder.suggestInstantiationType(serviceModel, null));
+ }
+
+ @DataProvider
public static Object[][] anyAlacarteDataProvider() {
return new Object[][] {
- {"A-La-Carte", InstantiationUI.ANY_ALACARTE_NEW_UI},
- {"Macro", InstantiationUI.LEGACY},
+ {InstantiationType.ALaCarte, InstantiationUI.ANY_ALACARTE_NEW_UI},
+ {InstantiationType.Macro, InstantiationUI.LEGACY},
};
}
@Test(dataProvider = "anyAlacarteDataProvider")
- public void FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI_is_active_UIHintIsPositive(String instantiationType, InstantiationUI expectedInstantiationUI) {
+ public void FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI_is_active_UIHintIsPositive(InstantiationType instantiationType, InstantiationUI expectedInstantiationUI) {
initServiceModelAndscarHelperWithMocks();
+ String instantiationTypeAsString = instantiationType==InstantiationType.ALaCarte ? "A-La-Carte" : "Macro";
+
when(featureManagerMock.isActive(Features.FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI)).thenReturn(true);
when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(ImmutableMap.of(
- "instantiationType", instantiationType
+ "instantiationType", instantiationTypeAsString
)));
NodeTemplate nodeTemplate = mock(NodeTemplate.class);
@@ -143,7 +213,7 @@ public class VidNotionsBuilderTest {
when(csarHelper.getServiceVlList()).thenReturn(ImmutableList.of(nodeTemplate));
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(expectedInstantiationUI));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, instantiationType), is(expectedInstantiationUI));
}
@Test
@@ -159,7 +229,7 @@ public class VidNotionsBuilderTest {
when(csarHelper.getServiceVlList()).thenReturn(ImmutableList.of(nodeTemplate));
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(InstantiationUI.LEGACY));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ALaCarte), is(InstantiationUI.LEGACY));
assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel) , is(ModelCategory.OTHER));
}
@@ -169,7 +239,7 @@ public class VidNotionsBuilderTest {
assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
assertThat(vidNotionsBuilder.hasAnyNetworkWithPropertyEqualsToAnyOf(csarHelper, "unexpected_property_name"), is(false));
assertThat(vidNotionsBuilder.hasAnyNetworkWithPropertyEqualsToAnyOf(csarHelper, "network_technology","Standard-SR-IOV"), is(true));
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(InstantiationUI.LEGACY));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(InstantiationUI.LEGACY));
}
@Test
@@ -177,7 +247,7 @@ public class VidNotionsBuilderTest {
initServiceModelAndscarHelperWithRealCsar("/csars/service-fabric-configuration.zip");
assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
assertThat(vidNotionsBuilder.hasFabricConfiguration(csarHelper), is(true));
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(InstantiationUI.LEGACY));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(InstantiationUI.LEGACY));
}
@Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
@@ -187,7 +257,7 @@ public class VidNotionsBuilderTest {
when(featureManagerMock.isActive(Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI)).thenReturn(flagValue);
assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(flagValue ? InstantiationUI.TRANSPORT_SERVICE : InstantiationUI.LEGACY));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(flagValue ? InstantiationUI.TRANSPORT_SERVICE : InstantiationUI.LEGACY));
assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.Transport));
}
@@ -195,7 +265,7 @@ public class VidNotionsBuilderTest {
public void withoutMocks_givenZippedToscaFileOfInfraStructureVpn_InstantiationUIIsRight(boolean flagValue) throws SdcToscaParserException, IOException {
initServiceModelAndscarHelperWithRealCsar("/csars/service-Infravpn-csar.zip");
when(featureManagerMock.isActive(Features.FLAG_1908_INFRASTRUCTURE_VPN)).thenReturn(flagValue);
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(flagValue ? InstantiationUI.INFRASTRUCTURE_VPN : InstantiationUI.LEGACY));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(flagValue ? InstantiationUI.INFRASTRUCTURE_VPN : InstantiationUI.LEGACY));
assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.INFRASTRUCTURE_VPN));
}
@@ -232,21 +302,20 @@ public class VidNotionsBuilderTest {
@DataProvider
public static Object[][] anyAlaCarteDataProvider() {
return new Object[][] {
- {true, Constants.A_LA_CARTE, InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED},
- {false, Constants.A_LA_CARTE, InstantiationUI.LEGACY},
- {true, Constants.MACRO, InstantiationUI.LEGACY},
- {true, Constants.CLIENT_CONFIG, InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED},
+ {true, InstantiationType.ALaCarte, InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED},
+ {false, InstantiationType.ALaCarte, InstantiationUI.LEGACY},
+ {true, InstantiationType.Macro, InstantiationUI.LEGACY},
+ {true, InstantiationType.ClientConfig, InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED},
{true, null, InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED},
- {true, "", InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED}
};
}
@Test(dataProvider = "anyAlaCarteDataProvider")
- public void testAnyAlaCarteNewUI_byInstantiationTypeAndFeatureFlag(boolean flag, String instantiationType, InstantiationUI expected) {
+ public void testAnyAlaCarteNewUI_byInstantiationTypeAndFeatureFlag(boolean flag, InstantiationType instantiationType, InstantiationUI expected) {
initServiceModelAndscarHelperWithMocks();
- mockInstantiationType(serviceModel, instantiationType);
+ //mockInstantiationType(serviceModel, instantiationType);
when(featureManagerMock.isActive(Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI)).thenReturn(flag);
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(expected));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, instantiationType), is(expected));
}
@Test
@@ -257,7 +326,7 @@ public class VidNotionsBuilderTest {
"UUID", "95eb2c44-bff2-4e8b-ad5d-8266870b7717"
)));
when(featureManagerMock.isActive(Features.FLAG_5G_IN_NEW_INSTANTIATION_UI)).thenReturn(true);
- assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER), is(InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de));
+ assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de));
}
@Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
@@ -290,7 +359,7 @@ public class VidNotionsBuilderTest {
"serviceRole", serviceRole
)));
- assertThat(vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER), is(expectedViewEditUI));
+ assertThat(vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig), is(expectedViewEditUI));
}
@DataProvider
@@ -316,7 +385,7 @@ public class VidNotionsBuilderTest {
ServiceModel serviceModel = mock(ServiceModel.class);
mockInstantiationType(serviceModel, Constants.A_LA_CARTE);
- InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER);
+ InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ClientConfig);
assertEquals(expectedViewEditUi, result);
}
@@ -470,7 +539,7 @@ public class VidNotionsBuilderTest {
emptyMap() : ImmutableMap.of(ToscaParserImpl2.Constants.SERVICE_ROLE, serviceRole)
));
- assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER));
+ assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel, ModelCategory.OTHER, InstantiationType.ALaCarte));
}
private static NodeTemplate mockNodeTemplateChild(boolean withFabricConfiguration) {
@@ -524,15 +593,14 @@ public class VidNotionsBuilderTest {
initServiceModelAndscarHelperWithMocks();
Service service = mock(Service.class);
- String instantiationType = isMacro ? ToscaParserImpl2.Constants.MACRO : ToscaParserImpl2.Constants.A_LA_CARTE;
+ InstantiationType instantiationType = isMacro ? InstantiationType.Macro : InstantiationType.ALaCarte;
when(serviceModel.getService()).thenReturn(service);
- when(service.getInstantiationType()).thenReturn(instantiationType);
when(featureManagerMock.isActive(Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT)).thenReturn(flagActive);
when(featureManagerMock.isActive(Features.FLAG_1902_NEW_VIEW_EDIT)).thenReturn(false);
when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(isTransport ? ImmutableMap.of(ToscaParserImpl2.Constants.SERVICE_TYPE, "TRANSPORT") : emptyMap()
));
- assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER));
+ assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER, instantiationType));
}
@DataProvider
@@ -540,10 +608,10 @@ public class VidNotionsBuilderTest {
return new Object[][]{
{"117f5f1a-1b47-4ae1-ae04-489c9a7ada28", true},
{"117F5f1a-1b47-4AE1-ae04-489C9A7ada28", true},
- {"2efab359-cdd4-4da2-9b79-61df990796c2", true},
+ {MACRO_SERVICE_INVARIANT_UUID, true},
{"67e09a1f-9e42-4b63-8dee-bc60bae50de1", false},
{"67e09A1F-9E42-4b63-8Dee-bc60bae50de1", false},
- {"5d854f6b-759c-4aa6-b472-7e4bb1c003d4", false},
+ {NOT_MACRO_SERVICE_INVARIANT_UUID, false},
{"I'm not a uuid", false},
{null, false},
};
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
index 42a62e268..46c99e77c 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
@@ -33,7 +33,7 @@
"xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
"b0732bed-3ddf-43cc-b193-7f18db84e476": {
"action": "None_Upgrade",
- "retainAssignments" : true,
+ "retainAssignments" : false,
"instanceName": "PST-VfMod-Replace-5-Vfmod",
"instanceId": "b0732bed-3ddf-43cc-b193-7f18db84e476",
"orchStatus": "Active",
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
index 8e090ae39..98ba26c18 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
@@ -33,7 +33,7 @@
}
],
"requestParameters": {
- "retainAssignments": true,
+ "retainAssignments": false,
"userParams": [],
"testApi": "VNF_API"
},
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index 5a3026a01..c1a505276 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -5,7 +5,6 @@ import org.togglz.core.context.FeatureContext;
public enum Features implements Feature {
- EMPTY_DRAWING_BOARD_TEST,
FLAG_ADD_MSO_TESTAPI_FIELD,
FLAG_SERVICE_MODEL_CACHE,
FLAG_NETWORK_TO_ASYNC_INSTANTIATION,
@@ -56,6 +55,7 @@ public enum Features implements Feature {
FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE,
FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI,
FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS,
+ FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND,
;
public boolean isActive() {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
index 0671815bd..a9378e6df 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
@@ -5,6 +5,7 @@ import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static vid.automation.test.infra.Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND;
import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION;
import static vid.automation.test.infra.Features.FLAG_SHOW_ORCHESTRATION_TYPE;
@@ -29,7 +30,7 @@ import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessi
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
-import org.testng.TimeBombSkipException;
+import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
@@ -181,9 +182,9 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
@Test
private void browseServiceModel_deployServiceMacroByMACRO_SERVICESConfig_creationPopupIsOldMacro() {
- if (FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI.isActive() ) {
- throw new TimeBombSkipException("skipping identify macro by uuid for awhile", "2019/11/25");
- //also need to handle the simulator preset by using good ModelInfo instance
+ if (FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI.isActive() &&
+ ! FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND.isActive()) {
+ throw new SkipException("some 2002 flags shall come along together");
}
deployServiceAndAssertInstantiationType(
"csar15782222_invariantUUIDMacro.zip",
diff --git a/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json b/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
index 0a8e09fc4..591603fe0 100644
--- a/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
+++ b/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
@@ -13,7 +13,6 @@
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
"FLAG_SUPPLEMENTARY_FILE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_5G_IN_NEW_INSTANTIATION_UI": true,
"FLAG_RESTRICTED_SELECT": false,
diff --git a/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json b/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json
deleted file mode 100644
index 7b39f77e6..000000000
--- a/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "simulatorRequest": {
- "method": "GET",
- "path": "/vidSimulator/getSomeFile"
-} ,
- "simulatorResponse": {
- "responseCode": 200,
- "file": "csar15782222_invariantUUIDMacro.zip"
- }
-} \ No newline at end of file
diff --git a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
index 918c4131e..8549613f8 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
@@ -21,6 +21,7 @@
package org.onap.vid.api;
import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonPartEquals;
import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals;
import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -130,9 +131,16 @@ public class SdcApiTest extends BaseApiTest {
ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MACRO_INSTANTIATION_TYPE_UUID), String.class);
assertEquals(response.getStatusCode(), HttpStatus.OK);
String emptyInstantiationTypeExpectedResponse = loadResourceAsString(EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
- assertThat(response.getBody(), jsonEquals(emptyInstantiationTypeExpectedResponse)
+
+ final String body = response.getBody();
+
+ assertThat(body, jsonEquals(emptyInstantiationTypeExpectedResponse)
.when(IGNORING_ARRAY_ORDER)
- .whenIgnoringPaths("service.vidNotions.instantiationUI"));
+ .whenIgnoringPaths("service.vidNotions.instantiationUI", "service.vidNotions.instantiationType"));
+
+ assertThat(body, jsonPartEquals("service.vidNotions.instantiationType",
+ Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND.isActive()
+ ? "ALaCarte" : "ClientConfig"));
}
@Test
@@ -154,7 +162,7 @@ public class SdcApiTest extends BaseApiTest {
String minMaxInitialExpectedResponse = loadResourceAsString("sdcApiTest/minMaxInitialExpectedResponse.json");
assertThat(response.getBody(), jsonEquals(minMaxInitialExpectedResponse)
.when(IGNORING_ARRAY_ORDER)
- .whenIgnoringPaths("service.vidNotions.instantiationUI"));
+ .whenIgnoringPaths("service.vidNotions.instantiationUI", "service.vidNotions.instantiationType"));
}
@Test
diff --git a/vid-automation/src/test/resources/features.properties b/vid-automation/src/test/resources/features.properties
index f3ed49122..3b7fd310d 100644
--- a/vid-automation/src/test/resources/features.properties
+++ b/vid-automation/src/test/resources/features.properties
@@ -1,4 +1,3 @@
-EMPTY_DRAWING_BOARD_TEST = false
FLAG_ADD_MSO_TESTAPI_FIELD = true
FLAG_NETWORK_TO_ASYNC_INSTANTIATION = false
FLAG_SERVICE_MODEL_CACHE = true
diff --git a/vid-ext-services-simulator/src/main/resources/download_files/csar15782222_invariantUUIDMacro.zip b/vid-ext-services-simulator/src/main/resources/download_files/csar15782222_invariantUUIDMacro.zip
index c76b42601..fe9a7dd83 100644
--- a/vid-ext-services-simulator/src/main/resources/download_files/csar15782222_invariantUUIDMacro.zip
+++ b/vid-ext-services-simulator/src/main/resources/download_files/csar15782222_invariantUUIDMacro.zip
Binary files differ
diff --git a/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
index adc142a88..25c2fbbfa 100644
--- a/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/collectionResource.e2e.ts
@@ -1586,7 +1586,6 @@ describe('Drawing board : Collection resource', function () {
"FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true,
"FLAG_SHOW_VERIFY_SERVICE": true,
"FLAG_1902_NEW_VIEW_EDIT": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_1906_INSTANTIATION_API_USER_VALIDATION": true,
"FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL": false,
diff --git a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
index ac9d69045..33829fbfe 100644
--- a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
@@ -577,7 +577,6 @@ describe('Drawing board', function () {
"flags": {
"FLAG_SHOW_ASSIGNMENTS": true,
"FLAG_SHOW_VERIFY_SERVICE": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
@@ -2211,7 +2210,6 @@ describe('Drawing board', function () {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
@@ -3863,7 +3861,6 @@ describe('Drawing board', function () {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
@@ -6300,7 +6297,6 @@ describe('Drawing board', function () {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_SUPPLEMENTARY_FILE": true
},
diff --git a/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
index 059c8b74b..2f310b4fb 100644
--- a/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/network.popup.e2e.ts
@@ -215,7 +215,6 @@ describe('Network popup', function () {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
index c3b40262c..0a17fc907 100644
--- a/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/pnf.e2e.ts
@@ -1447,7 +1447,6 @@ function initDrawingBoardWithFourPnf(serviceModelId: string, pnfName: string) {
"FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true,
"FLAG_SHOW_VERIFY_SERVICE": true,
"FLAG_1902_NEW_VIEW_EDIT": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_1906_INSTANTIATION_API_USER_VALIDATION": true,
"FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL": false,
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index 2d1ef87fd..46e5fad44 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -105,7 +105,9 @@ describe('View Edit Page: Upgrade VFModule', function () {
initServicePlanning("EDIT",
'../vid-automation/src/test/resources/viewEdit/ServiceTreeWithMultipleChildren_serviceInstance_withUpdatedLatestVersion.json');
upgradeTheVFM();
+ assertVfModuleActionInRedux("None_Upgrade");
undoUpgradeForVFM();
+ assertVfModuleActionInRedux("None");
upgradeTheVFM();
cy.getDrawingBoardDeployBtn().click();
cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
@@ -217,6 +219,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
// The following is needed when enabling FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS
cy.getElementByDataTestsId('retainAssignments').click();
+ cy.screenshot();
cy.getElementByDataTestsId('form-set').click();
}
@@ -229,4 +232,13 @@ describe('View Edit Page: Upgrade VFModule', function () {
serviceModel.service.uuid = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
return serviceModel;
}
+
+ function assertVfModuleActionInRedux(expectedState:string) {
+ cy.getReduxState().then((state) => {
+ const vfModule = state.service.serviceInstance['6e59c5de-f052-46fa-aa7e-2fca9d674c44']
+ .vnfs["VNF2_INSTANCE_ID"]
+ .vfModules["vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1"]["2c1ca484-cbc2-408b-ab86-25a2c15ce280"];
+ expect(vfModule.action).to.equal(expectedState)
+ });
+ }
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
index 2335411ba..7a35491be 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
@@ -97,7 +97,6 @@ describe('Vnf popup', function () {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.spec.ts
index 4d6d84724..14d14668a 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.spec.ts
@@ -26,7 +26,6 @@ class MockAppStore<T> {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.spec.ts
index 510508ce4..f644a7c7e 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/service.control.generator.spec.ts
@@ -26,7 +26,6 @@ class MockAppStore<T> {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
index f11cc6bcc..62c5ce3f4 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
@@ -28,7 +28,6 @@ class MockAppStore<T> {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
index eb16f9c45..5c6e25c6b 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
@@ -29,7 +29,6 @@ class MockAppStore<T> {
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator.spec.ts
index 73fd878ab..49f1aa3ae 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator.spec.ts
@@ -25,7 +25,6 @@ class MockAppStore<T> {
"type": "UPDATE_DRAWING_BOARD_STATUS",
"drawingBoardStatus": "CREATE",
"flags": {
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_SERVICE_MODEL_CACHE": false,
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
index 605f4f78a..a36ed9c4c 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
@@ -34,7 +34,6 @@ class MockAppStore<T>{
"FLAG_SHOW_VERIFY_SERVICE": false,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts
index 4976032ed..c2024afe2 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts
@@ -35,7 +35,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts
index 801ec3b1e..6c20beccc 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/network/network.popup.service.spec.ts
@@ -32,7 +32,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts
index 74eb64943..f1e3af006 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/service/service.popup.service.spec.ts
@@ -33,7 +33,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts
index bc8a851a1..296db3469 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts
@@ -32,7 +32,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
index 251a14720..ff3f23ff4 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
@@ -46,7 +46,7 @@ export class VfModuleUpgradePopupService extends VfModulePopuopService {
controlName: 'retainAssignments',
displayName: 'Retain Assignments',
dataTestId: 'retainAssignments',
- value: false,
+ value: true,
validations: []
})
];
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
index 50b0d36c1..5850d25f0 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
@@ -84,6 +84,6 @@ describe('VFModule popup service', () => {
});
expect(retainAssignmentsControl).toBeDefined();
- expect(retainAssignmentsControl.value).toBeFalsy();
+ expect(retainAssignmentsControl.value).toBeTruthy();
});
});
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
index 14faff0a9..5f0347350 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
@@ -32,7 +32,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts
index 80c85393a..f0d50fd18 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts
@@ -32,7 +32,6 @@ class MockReduxStore<T> {
"FLAG_ADVANCED_PORTS_FILTER": true,
"FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
"FLAG_REGION_ID_FROM_REMOTE": true,
- "EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true
},
"type": "[FLAGS] Update"