aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/services
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2020-02-09 14:06:25 +0200
committerIttay Stern <ittay.stern@att.com>2020-02-23 15:36:56 +0000
commit44ffee127dc8f1dc4cd793f4dd1e375057c33086 (patch)
treea62ff96adc333543cf2d8abf4b2d72ee7607b7e4 /vid-webpack-master/src/app/shared/services
parentd6eedb1f342ac32c8339b553848267e443410d57 (diff)
upgrade vfmodule when upgraded already service, vnf and brother vfmodule e2e
- Use modelCustomizationId and modelVersionId from instance, instead of service-model hierarchy - Adds a Cypress test-case in viewEditUpgradeVfModule.e2e.ts - Assumes topology improved response in payload of: upgrade_vfmodule_when_service_vnf_and_brother_vfmodule_alredy_upgraded_e2e__service_instance.json (see Change Ib25c6cf7269614f2f4d332b3aa84b3307a59ebda) Issue-ID: Issue-ID: VID-771 Change-Id: I9d200dd619a3c3d0503f47777efd3780eaa2b7b2 Signed-off-by: Ittay Stern <ittay.stern@att.com> Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/services')
-rw-r--r--vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.spec.ts38
-rw-r--r--vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.ts6
2 files changed, 40 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.spec.ts b/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.spec.ts
index 03461eaa1..56f49e75c 100644
--- a/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.spec.ts
@@ -69,7 +69,7 @@ describe('Default Data Generator Service', () => {
expect(result.platformName).toBeNull();
expect(result.modelInfo.modelType).toEqual('VF');
expect(result.modelInfo.modelInvariantId).toEqual(serviceHierarchy.vnfs[vnfName].invariantUuid);
- expect(result.modelInfo.modelVersionId).toEqual(formValues.modelInfo.modelVersionId);
+ expect(result.modelInfo.modelVersionId).toEqual(serviceHierarchy.vnfs[vnfName].uuid);
expect(result.modelInfo.modelName).toEqual(serviceHierarchy.vnfs[vnfName].name);
expect(result.modelInfo.modelVersion).toEqual(serviceHierarchy.vnfs[vnfName].version);
expect(result.modelInfo.modelCustomizationId).toEqual(serviceHierarchy.vnfs[vnfName].customizationUuid);
@@ -114,6 +114,15 @@ describe('Default Data Generator Service', () => {
const newVfModule = service.createNewVfModuleTreeNode(<any>{
instanceName: "",
instanceParams: {},
+ modelInfo: {
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "modelName": "VF_vGeraldine 0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf",
+ "modelVersion": "1"
+ },
volumeGroupName: "",
isMissingData : false,
trackById: Math.random().toString()
@@ -128,6 +137,15 @@ describe('Default Data Generator Service', () => {
const newVfModule = service.createNewVfModuleTreeNode(<any>{
instanceName: "",
instanceParams: {},
+ modelInfo: {
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "modelName": "VF_vGeraldine 0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf",
+ "modelVersion": "1"
+ },
volumeGroupName: "",
isMissingData : false,
trackById: Math.random().toString()
@@ -152,6 +170,15 @@ describe('Default Data Generator Service', () => {
rollbackOnFailure: "rollbackOnFailure",
originalName : null,
vfModules: {},
+ modelInfo: {
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "modelName": "VF_vGeraldine 0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf",
+ "modelVersion": "1"
+ },
isMissingData: false,
trackById: Math.random().toString(),
vnfStoreKey: "abc"
@@ -174,6 +201,15 @@ describe('Default Data Generator Service', () => {
rollbackOnFailure: "rollbackOnFailure",
originalName : null,
vfModules: {},
+ modelInfo: {
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "modelName": "VF_vGeraldine 0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf",
+ "modelVersion": "1"
+ },
isMissingData: false,
trackById: Math.random().toString(),
vnfStoreKey: "abc"
diff --git a/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.ts b/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.ts
index a3cb475a0..3b3092a4c 100644
--- a/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.ts
+++ b/vid-webpack-master/src/app/shared/services/defaultDataServiceGenerator/default.data.generator.service.ts
@@ -359,7 +359,7 @@ export class DefaultDataGeneratorService {
'modelInfo': {
'modelType': 'VF',
'modelInvariantId': serviceHierarchy.vnfs[vnfName].invariantUuid,
- 'modelVersionId': formValues.modelInfo.modelVersionId,
+ 'modelVersionId': serviceHierarchy.vnfs[vnfName].uuid,
'modelName': serviceHierarchy.vnfs[vnfName].name,
'modelVersion': serviceHierarchy.vnfs[vnfName].version,
'modelCustomizationId': serviceHierarchy.vnfs[vnfName].customizationUuid,
@@ -382,7 +382,7 @@ export class DefaultDataGeneratorService {
'modelInfo': {
'modelType': 'VF',
'modelInvariantId': serviceHierarchy.network[networkName].invariantUuid,
- 'modelVersionId': formValues.modelInfo.modelVersionId,
+ 'modelVersionId': serviceHierarchy.network[networkName].uuid,
'modelName': serviceHierarchy.network[networkName].name,
'modelVersion': serviceHierarchy.network[networkName].version,
'modelCustomizationId': serviceHierarchy.network[networkName].modelCustomizationId,
@@ -401,7 +401,7 @@ export class DefaultDataGeneratorService {
'modelInfo': {
'modelType': 'VnfGroup',
'modelInvariantId': serviceHierarchy.vnfGroups[vnfGroupName].invariantUuid,
- 'modelVersionId': formValues.modelInfo.modelVersionId,
+ 'modelVersionId': serviceHierarchy.vnfGroups[vnfGroupName].uuid,
'modelName': serviceHierarchy.vnfGroups[vnfGroupName].name,
'modelVersion': serviceHierarchy.vnfGroups[vnfGroupName].version,
'modelCustomizationId': serviceHierarchy.vnfGroups[vnfGroupName].modelCustomizationId,