aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src
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
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')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts3
-rw-r--r--vid-webpack-master/src/app/shared/models/treeNodeModel.ts9
-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
4 files changed, 49 insertions, 7 deletions
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 5cf6e96f7..43c3d2677 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
@@ -2261,9 +2261,10 @@ describe('Model Tree Generator service', () => {
"modelInfo": {
"modelType": "VF",
"modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
- "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
"modelName": "2017-388_PASQUALE-vPE",
"modelVersion": "4.0",
+ "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
"modelCustomizationName": "2017-388_PASQUALE-vPE 0"
}
},
diff --git a/vid-webpack-master/src/app/shared/models/treeNodeModel.ts b/vid-webpack-master/src/app/shared/models/treeNodeModel.ts
index 39f56228e..8da204ce6 100644
--- a/vid-webpack-master/src/app/shared/models/treeNodeModel.ts
+++ b/vid-webpack-master/src/app/shared/models/treeNodeModel.ts
@@ -34,9 +34,14 @@ export class TreeNodeModel {
instanceName?: string;
constructor(instance: ChildNodeInstance, nodeModel: NodeModel){
+
this.modelInvariantId = nodeModel.invariantUuid;
- this.modelCustomizationId = nodeModel.customizationUuid;
- this.modelId = nodeModel.uuid;
+ if (instance.modelInfo) {
+ this.modelCustomizationId = instance.modelInfo.modelCustomizationId;
+ this.modelId = instance.modelInfo.modelVersionId;
+ } else {
+ console.debug("no 'modelInfo' in node-instance", instance)
+ }
this.modelUniqueId = this.modelCustomizationId || this.modelId;
this.missingData = false;
this.id = instance.trackById;
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,