aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features.properties.md7
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/properties/Features.java1
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteCypress2.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java2
-rw-r--r--vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json2
-rw-r--r--vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts6
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts13
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts20
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts2
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts25
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts46
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts14
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.ts4
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts12
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts21
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts15
-rw-r--r--vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts2
20 files changed, 129 insertions, 71 deletions
diff --git a/features.properties.md b/features.properties.md
index dedb0e371..3e7c6cd52 100644
--- a/features.properties.md
+++ b/features.properties.md
@@ -224,12 +224,13 @@
When off, user is requested to specify LCP-Region and Tenant for each VF Module.
* FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT
- When flag is true the platform will appear as a multi select field, if false the platform will be dropdown list.
+ When flag is true the platform will appear as a multi select field, if false the platform will be limited to a single value.
* FLAG_2006_NETWORK_LOB_MULTI_SELECT
- When flag is true the LOB will appear as a multi select field, if false the platform will be dropdown list.
-
+ When flag is true the LOB will appear as a multi select field, if false the Line Of Business will be limited to a single value.
+ * FLAG_2006_VNF_LOB_MULTI_SELECT
+ When flag is true the LOB will appear as a multi select field, if false the Line Of Business will be limited to a single value.
* FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD
When flag is true VID will use the format=simpleNoTaskInfo parameter in addition to the filter parameter when fetching orchestration requests for the change-management dashboard.
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 35f18aafe..5c3f7835f 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
@@ -92,6 +92,7 @@ public enum Features implements Feature {
FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT,
FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD,
FLAG_2006_NETWORK_LOB_MULTI_SELECT,
+ FLAG_2006_VNF_LOB_MULTI_SELECT,
;
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteCypress2.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteCypress2.java
index 98883ab78..e052117cd 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteCypress2.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteCypress2.java
@@ -32,7 +32,7 @@ public class PresetMSOCreateVnfALaCarteCypress2 extends PresetMSOCreateVnfBase {
"\"source\":\"VID\"," +
"\"suppressRollback\":false," +
"\"requestorId\":\"us16807000\"}," +
- "\"lineOfBusiness\":{\"lineOfBusinessName\":\"zzz1\"}," +
+ "\"lineOfBusiness\":{\"lineOfBusinessName\":\"zzz1,ONAP\"}," +
"\"cloudConfiguration\":" +
"{\"lcpCloudRegionId\":\"" + getLcpCloudRegionId() + "\"," +
addCloudOwnerIfNeeded() +
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 8d9765cec..5e83062a2 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
@@ -64,7 +64,7 @@ public enum Features implements Feature {
FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT,
FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD,
FLAG_2006_NETWORK_LOB_MULTI_SELECT,
-
+ FLAG_2006_VNF_LOB_MULTI_SELECT,
;
public boolean isActive() {
diff --git a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json
index 1c22fb894..9d4e7ba24 100644
--- a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json
+++ b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json
@@ -102,7 +102,7 @@
"legacyRegion": "just another region",
"tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
"platformName": "xxx1,platform",
- "lineOfBusiness": "zzz1",
+ "lineOfBusiness": "zzz1,ONAP",
"instanceParams": [
{}
],
diff --git a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json
index 7924340c0..a82045956 100644
--- a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json
+++ b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json
@@ -99,7 +99,7 @@
"legacyRegion": "just another region",
"tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
"platformName": "xxx1,platform",
- "lineOfBusiness": "zzz1",
+ "lineOfBusiness": "zzz1,ONAP",
"instanceParams": [
{}
],
diff --git a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
index 8f5341c26..4ececb03d 100644
--- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
@@ -92,6 +92,7 @@ describe('A la carte', function () {
it(`VNF a-la-carte`, () => {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((res) => {
res['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'] = true;
+ res['FLAG_2006_VNF_LOB_MULTI_SELECT'] = true;
cy.server()
.route({
method: 'GET',
@@ -134,7 +135,7 @@ describe('A la carte', function () {
cy.selectDropdownOptionByText('lcpRegion', 'AAIAIC25');
cy.typeToInput("lcpRegionText", "just another region");
cy.selectDropdownOptionByText('tenant', 'USP-SIP-IC-24335-T-01');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
@@ -145,6 +146,7 @@ describe('A la carte', function () {
cy.getElementByDataTestsId(vnfMenuBtnDataTestId).click({force: true}).then(() => {
cy.getElementByDataTestsId('context-menu-edit').click({force: true});
cy.selectPlatformValue(`platform`);
+ cy.selectLobValue('ONAP');
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
cy.getReduxState().then((state) => {
@@ -236,7 +238,7 @@ describe('A la carte', function () {
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
const vnfName = '2017-488_PASQUALE-vPE 0';
diff --git a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
index ab1e1644b..63df833ab 100644
--- a/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/drawingBoard.e2e.ts
@@ -376,7 +376,7 @@ describe('Drawing board', function () {
cy.selectDropdownOptionByText('productFamily', 'ERICA');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testalexandria');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP');
+ cy.selectLobValue('ONAP');
cy.selectPlatformValue(`platform`);
cy.genericFormSubmitForm();
@@ -397,7 +397,7 @@ describe('Drawing board', function () {
cy.selectDropdownOptionByText('productFamily', 'ERICA');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testalexandria');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP')
+ cy.selectLobValue('ONAP')
cy.selectPlatformValue(`platform`);
cy.genericFormSubmitForm();
@@ -636,7 +636,9 @@ describe('Drawing board', function () {
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_1906_COMPONENT_INFO" : false,
"FLAG_2002_VNF_PLATFORM_MULTI_SELECT" : false,
- "FLAG_2002_UNLIMITED_MAX" : true
+ "FLAG_2002_UNLIMITED_MAX" : true,
+ "FLAG_2006_VNF_LOB_MULTI_SELECT" : false,
+
},
"type": "[FLAGS] Update"
},
@@ -7368,7 +7370,10 @@ describe('Drawing board', function () {
function editSecondVnf(vnfNode: string) {
cy.drawingBoardTreeOpenContextMenuByElementDataTestId(vnfNode, 1)
.drawingBoardTreeClickOnContextMenuOptionByName('Edit');
- cy.selectDropdownOptionByText('lineOfBusiness', 'ONAP');
+ //uncheck lob value
+ cy.selectLobValue('zzz1');
+ // select a new lob value
+ cy.selectLobValue('ONAP');
cy.genericFormSubmitForm();
}
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index 6fb667588..027901f0f 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -235,7 +235,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
});
- it(`Upgrade a VFModule: upgrade vfmodule when upgraded already service, vnf and borther vfmodule e2e`, function () {
+ it(`Upgrade a VFModule: upgrade vfmodule when upgraded already service, vnf and brother vfmodule e2e`, function () {
const serviceType = 'Emanuel';
const subscriberId = 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb';
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
index 1d94454fb..efe9d5408 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
@@ -96,6 +96,13 @@ describe('View only drawing board', function () {
});
cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json').then((res) => {
+ res.vnfs['2017-488_PASQUALE-vPE 0']
+ .vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot']
+ .modelInfo.modelVersion = '2';
+ res.vnfs['2017-488_PASQUALE-vPE 0']
+ .vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc']
+ .modelInfo.modelVersion = null;
+
jsonBuilderAndMock.basicJson(
res,
Cypress.config('baseUrl') + "/aai_get_service_instance_topology/e433710f-9217-458d-a79d-1c7aff376d89/TYLER SILVIA/f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
@@ -127,6 +134,14 @@ describe('View only drawing board', function () {
cy.getElementByDataTestsId('node-f8360508-3f17-4414-a2ed-6bc71161e8db-2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0').find("[data-tests-id='status-property-orchStatus']").eq(0).should('have.text', 'Active');
cy.getElementByDataTestsId('node-f8360508-3f17-4414-a2ed-6bc71161e8db-2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0').find("[data-tests-id='status-property-inMaint']").eq(0).should('have.text', '');
+ checkVfModuleModelVersion('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0',
+ 'node-f8360508-3f17-4414-a2ed-6bc71161e8db-2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0',
+ '2');
+
+ checkVfModuleModelVersion('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0',
+ 'node-25284168-24bb-4698-8cb4-3f509146eca5-2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1',
+ '');
+
cy.getElementByDataTestsId("serviceInstance").should('have.text', 'Service instance:');
cy.getElementByDataTestsId("serviceName").should('have.text', 'mCaNkinstancename');
cy.getElementByDataTestsId("orchStatusLabel").should('have.text', 'Orch Status:');
@@ -326,6 +341,11 @@ describe('View only drawing board', function () {
});
+ function checkVfModuleModelVersion(vnfNodeDataTestId: string, vfModuleDataTestId: string, vfModuleModelVersion: string){
+ cy.getElementByDataTestsId(vnfNodeDataTestId)
+ .getElementByDataTestsId(vfModuleDataTestId)
+ .find("[data-tests-id='status-property-modelVersion']").eq(0).should('have.text', vfModuleModelVersion);
+ }
function testComponentInfoForVNF(){
const labelsAndValuesForModel = [
['Model version', '2.0'],
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 3b56ac085..b05bbe5a5 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
@@ -80,7 +80,7 @@ describe('Vnf popup', function () {
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
})
diff --git a/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts b/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts
index 7c82cf802..60453f0fa 100644
--- a/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts
+++ b/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts
@@ -11,7 +11,7 @@ function FillVnfPopup(): Chainable<any> {
cy.selectDropdownOptionByText('productFamily', 'Emanuel');
cy.selectDropdownOptionByText('lcpRegion', 'hvf6');
cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2');
- cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
+ cy.selectLobValue('zzz1');
cy.selectPlatformValue(`xxx1`);
return cy.getElementByDataTestsId('form-set').click({force : true}).then((done)=>{
return done;
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts
index a81c86025..f8a738ac7 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts
@@ -2616,10 +2616,10 @@ describe('Model Tree Generator service', () => {
"children": [],
"statusMessage": "Failed Vnf Message",
"statusProperties": [Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: 'prov',
testId: 'provStatus'
- }), Object({ key: 'Orch Status:', value: 'Active', testId: 'orchStatus' }), Object({
+ }), Object({ key: 'Orch Status: ', value: 'Active', testId: 'orchStatus' }), Object({
key: 'In-maintenance',
value: '',
testId: 'inMaint'
@@ -2641,10 +2641,10 @@ describe('Model Tree Generator service', () => {
"vnfStoreKey": "2017-488_PASQUALE-vPE 0",
"typeName": "VNF",
"statusProperties": [Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: undefined,
testId: 'provStatus'
- }), Object({ key: 'Orch Status:', value: undefined, testId: 'orchStatus' })],
+ }), Object({ key: 'Orch Status: ', value: undefined, testId: 'orchStatus' })],
"children": [{
"parentType": 'VNF',
"action": 'None',
@@ -2674,10 +2674,15 @@ describe('Model Tree Generator service', () => {
"dynamicModelName": "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0zssmp",
"typeName": "M",
"statusProperties": [Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: undefined,
testId: 'provStatus'
- }), Object({ key: 'Orch Status:', value: undefined, testId: 'orchStatus' })],
+ }), Object({ key: 'Orch Status: ', value: undefined, testId: 'orchStatus' }),
+ Object({
+ key: 'Model Version: ',
+ value: '5',
+ testId: 'modelVersion'
+ })],
}]
}]
}
@@ -2698,10 +2703,10 @@ describe('Model Tree Generator service', () => {
"vnfStoreKey": "2017-488_PASQUALE-vPE 0",
"typeName": "VNF",
"statusProperties": [Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: undefined,
testId: 'provStatus'
- }), Object({ key: 'Orch Status:', value: undefined, testId: 'orchStatus' })],
+ }), Object({ key: 'Orch Status: ', value: undefined, testId: 'orchStatus' })],
"children": [
{
"action": 'None',
@@ -2788,10 +2793,10 @@ describe('Model Tree Generator service', () => {
"networkStoreKey": "ExtVL 0",
"typeName": "N",
"statusProperties": [Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: undefined,
testId: 'provStatus'
- }), Object({ key: 'Orch Status:', value: undefined, testId: 'orchStatus' })],
+ }), Object({ key: 'Orch Status: ', value: undefined, testId: 'orchStatus' })],
},
{
"parentType": '',
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
index fcef504fd..60f59de4c 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
@@ -312,23 +312,55 @@ describe('Shared Tree Service', () => {
});
test('statusProperties should be prop on node according to node properties', () => {
- let node = service.addingStatusProperty({orchStatus: 'completed', provStatus: 'inProgress', inMaint: false});
+
+ let node = service.addingStatusProperty({orchStatus: 'completed', provStatus: 'inProgress', type: 'VFmodule', instanceModelInfo:{modelVersion: '1'}, inMaint: false});
expect(node.statusProperties).toBeDefined();
expect(node.statusProperties).toEqual([Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: 'inProgress',
testId: 'provStatus'
- }), Object({key: 'Orch Status:', value: 'completed', testId: 'orchStatus'})]);
- node = service.addingStatusProperty({orchStatus: 'completed', provStatus: 'inProgress', inMaint: true});
+ }), Object({
+ key: 'Orch Status: ',
+ value: 'completed',
+ testId: 'orchStatus'
+ }),
+ Object({
+ key: 'Model Version: ',
+ value: '1',
+ testId: 'modelVersion'
+ })]);
+ node = service.addingStatusProperty({orchStatus: 'completed', provStatus: 'inProgress',type: 'VFmodule', instanceModelInfo:{}, inMaint: true});
expect(node.statusProperties).toEqual([Object({
- key: 'Prov Status:',
+ key: 'Prov Status: ',
value: 'inProgress',
testId: 'provStatus'
- }), Object({key: 'Orch Status:', value: 'completed', testId: 'orchStatus'}), Object({
+ }), Object({
+ key: 'Orch Status: ',
+ value: 'completed',
+ testId: 'orchStatus'
+ }), Object({
+ key: 'Model Version: ',
+ value: undefined,
+ testId: 'modelVersion'
+ }), Object({
key: 'In-maintenance',
value: '',
testId: 'inMaint'
- })]);
+ })
+]);
+ });
+ each([
+ ['version 2', '2', '2'],
+ ['undefined', null, undefined]
+ ]).
+ test('getNodeModelVersion should return %s', (description, nodeVersion, expectedVersion) => {
+ let node = <any>{
+ instanceModelInfo:{
+ modelVersion: nodeVersion
+ }
+ };
+ let actualVersion = service.getNodeModelVersion(node);
+ expect(actualVersion).toEqual(expectedVersion);
});
each([
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
index 1e8512784..249f9ec85 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
@@ -120,14 +120,24 @@ export class SharedTreeService {
addingStatusProperty(node) {
node['statusProperties'] = [];
- node['statusProperties'].push({key: 'Prov Status:', value: node.provStatus, testId: 'provStatus'});
- node['statusProperties'].push({key: 'Orch Status:', value: node.orchStatus, testId: 'orchStatus'});
+ node['statusProperties'].push({key: 'Prov Status: ', value: node.provStatus, testId: 'provStatus'});
+ node['statusProperties'].push({key: 'Orch Status: ', value: node.orchStatus, testId: 'orchStatus'});
+ if(node.type === 'VFmodule') {
+ node['statusProperties'].push({key: 'Model Version: ', value: this.getNodeModelVersion(node), testId: 'modelVersion'});
+ }
if (node.inMaint) {
node['statusProperties'].push({key: 'In-maintenance', value: '', testId: 'inMaint'});
}
return node;
}
+ getNodeModelVersion(node): string | undefined {
+ if(!_.isNil(node.instanceModelInfo) && !_.isNil(node.instanceModelInfo.modelVersion)){
+ return node.instanceModelInfo.modelVersion;
+ }
+ return undefined;
+ }
+
/**********************************************
* should delete or remove child instance's
"new" -> should remove
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.ts
index fe6a2580d..08d689d77 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator.ts
@@ -64,7 +64,7 @@ export class NetworkControlGenerator {
result.push(this._sharedControllersService.getLegacyRegion(networkInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, networkInstance));
result.push(this._sharedControllersService.getPlatformMultiselectControl(networkInstance, result, flags['FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getMultiSelectLineOfBusinessControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
+ result.push(this._sharedControllersService.getLobMultiselectControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
}
return result;
@@ -89,7 +89,7 @@ export class NetworkControlGenerator {
result.push(this._sharedControllersService.getLegacyRegion(networkInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, networkInstance));
result.push(this._sharedControllersService.getPlatformMultiselectControl(networkInstance, result, flags['FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getMultiSelectLineOfBusinessControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
+ result.push(this._sharedControllersService.getLobMultiselectControl(networkInstance, flags['FLAG_2006_NETWORK_LOB_MULTI_SELECT']));
result.push(this._sharedControllersService.getRollbackOnFailureControl(networkInstance));
}
return result;
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts
index b141a1e79..6ee318644 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.spec.ts
@@ -9,6 +9,7 @@ import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flag
import {DropdownFormControl} from "../../../../models/formControlModels/dropdownFormControl.model";
import {FormControlModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model";
import {ControlGeneratorUtil} from "../control.generator.util.service";
+import {MultiselectFormControl} from "../../../../models/formControlModels/multiselectFormControl.model";
import each from "jest-each";
@@ -38,20 +39,15 @@ describe('Shared Controllers Service', () => {
})().then(done).catch(done.fail));
-
-
-
-
test('getLineOfBusinessControl', ()=> {
- const lineOfBusinessControl :DropdownFormControl = service.getLineOfBusinessControl();
- expect(lineOfBusinessControl.name).toEqual('lineOfBusiness');
+ const lineOfBusinessControl :MultiselectFormControl = service.getLobMultiselectControl(undefined, true);
expect(lineOfBusinessControl.controlName).toEqual('lineOfBusiness');
expect(lineOfBusinessControl.displayName).toEqual('Line of business');
- expect(lineOfBusinessControl.dataTestId).toEqual('lineOfBusiness');
+ expect(lineOfBusinessControl.dataTestId).toEqual('multi-lineOfBusiness');
expect(lineOfBusinessControl.placeHolder).toEqual('Select Line Of Business');
expect(lineOfBusinessControl.onInitSelectedField).toEqual(['lineOfBusinessList']);
expect(lineOfBusinessControl.onInit).toBeDefined();
- expect(lineOfBusinessControl.value).toBeNull();
+ expect(lineOfBusinessControl.value).toBe("");
expect(lineOfBusinessControl.validations.find((validation)=> validation.validatorName === ValidatorOptions.required)).toBeDefined();
expect(lineOfBusinessControl.isDisabled).toBeFalsy();
});
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
index d589efa14..b10ed9a75 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
@@ -25,27 +25,6 @@ export class SharedControllersService {
private _aaiService : AaiService,
private _basicControlGenerator : ControlGeneratorUtil){}
-
- getLineOfBusinessControl = (instance?: any): DropdownFormControl => {
- return new DropdownFormControl({
- type: FormControlType.DROPDOWN,
- controlName: 'lineOfBusiness',
- displayName: 'Line of business',
- dataTestId: 'lineOfBusiness',
- placeHolder: 'Select Line Of Business',
- isDisabled: false,
- name: "lineOfBusiness",
- value: instance ? instance.lineOfBusiness : null,
- validations: [new ValidatorModel(ValidatorOptions.required, 'is required')],
- onInitSelectedField: ['lineOfBusinessList'],
- onInit: this._basicControlGenerator.getSubscribeInitResult.bind(null, this._aaiService.getCategoryParameters)
- })
- };
-
- getMultiSelectLineOfBusinessControl = (instance: any, isMultiSelected: boolean): MultiselectFormControl => {
- return this.getLobMultiselectControl(instance, isMultiSelected);
- };
-
getTenantControl = (serviceId: string, instance?: any): DropdownFormControl => {
const service = this._store.getState().service.serviceInstance[serviceId];
const globalCustomerId: string = service.globalSubscriberId;
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
index 488df9a2f..b1f72a5f8 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
@@ -45,13 +45,16 @@ export class VnfControlGenerator {
const flags = this.store.getState().global.flags;
if (!_.isNil(vnfModel)) {
+ const isPlatformMultiSelected = flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'];
+ const isLobMultiSelected = flags['FLAG_2006_VNF_LOB_MULTI_SELECT'];
+
result.push(this.getInstanceName(vnfInstance, serviceId, vnfName, vnfModel.isEcompGeneratedNaming));
result.push(this._sharedControllersService.getProductFamilyControl(vnfInstance, result, true));
result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
- result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
+ result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isPlatformMultiSelected));
+ result.push(this._sharedControllersService.getLobMultiselectControl(vnfInstance, isLobMultiSelected));
}
return result;
}
@@ -66,16 +69,18 @@ export class VnfControlGenerator {
let result: FormControlModel[] = [];
const vnfInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store,this.getVnfInstance(serviceId, vnfStoreKey));
const vnfModel = new VNFModel(this.store.getState().service.serviceHierarchy[serviceId].vnfs[vnfName]);
+ const flags = this.store.getState().global.flags;
if (!_.isNil(vnfModel)) {
- const flags = this.store.getState().global.flags;
+ const isPlatformMultiSelected = flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT'];
+ const isLobMultiSelected = flags['FLAG_2006_VNF_LOB_MULTI_SELECT'];
result.push(this.getInstanceName(vnfInstance, serviceId, vnfName, vnfModel.isEcompGeneratedNaming));
result.push(this._sharedControllersService.getProductFamilyControl(vnfInstance, result, true));
result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
- result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT']));
- result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
+ result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isPlatformMultiSelected));
+ result.push(this._sharedControllersService.getLobMultiselectControl(vnfInstance,isLobMultiSelected));
result.push(this._sharedControllersService.getRollbackOnFailureControl(vnfInstance));
}
return result;
diff --git a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
index 5842662fb..78a2b1e67 100644
--- a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
+++ b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
@@ -20,6 +20,8 @@ export enum Features {
FLAG_2004_INSTANTIATION_TEMPLATES_POPUP = 'FLAG_2004_INSTANTIATION_TEMPLATES_POPUP',
FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY= 'FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY',
FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF = 'FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF',
+ FLAG_2006_VNF_LOB_MULTI_SELECT= 'FLAG_2006_VNF_LOB_MULTI_SELECT',
+
}
@Injectable()