import {DynamicInputsService} from "./dynamicInputs.service";
import {DialogService} from "ng2-bootstrap-modal";
import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
-import {BasicControlGenerator} from "../../../shared/components/genericForm/formControlsServices/basic.control.generator";
+import {ControlGeneratorUtil} from "../../../shared/components/genericForm/formControlsServices/control.generator.util.service";
import {AaiService} from "../../../shared/services/aaiService/aai.service";
import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
import {NetworkControlGenerator} from "../../../shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
import {VfModuleControlGenerator} from "../../../shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
import {VnfGroupControlGenerator} from "../../../shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator";
import {FeatureFlagsService} from "../../../shared/services/featureFlag/feature-flags.service";
import {ModelInformationItem} from "../../../shared/components/model-information/model-information.component";
import {VpnStepService} from "./models/vrf/vrfModal/vpnStep/vpn.step.service";
import {NetworkStepService} from "./models/vrf/vrfModal/networkStep/network.step.service";
+import {VfModuleUpgradePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
+import {SharedControllersService} from "../../../shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service";
+import {ModalService} from "../../../shared/components/customModal/services/modal.service";
+import {CreateDynamicComponentService} from "../../../shared/components/customModal/services/create-dynamic-component.service";
+import { PnfPopupService } from "../../../shared/components/genericFormPopup/genericFormServices/pnf/pnf.popup.service";
class MockAppStore<T> {
getState() {
}
}
-class MockVnfModelInfo<T> {
- getModel() {
- return {}
- }
-}
+
+function getNodeWithData(menuAction:string){
+ const nodeData = {
+ menuActions: {}
+ };
+ nodeData['menuActions'][menuAction] = {
+ method: (node, serviceModelId) => {}
+ };
+ const node = {
+ parent: {
+ data: nodeData,
+ parent: {
+ data: nodeData
+ }
+ }
+ };
+ return node
+}
+
describe('Shared Tree Service', () => {
let injector;
let service: SharedTreeService;
let _objectToInstanceTreeService: ObjectToInstanceTreeService;
let store: NgRedux<AppState>;
+
beforeAll(done => (async () => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, NgReduxTestingModule, SdcUiComponentsModule],
providers: [
SharedTreeService,
+ SharedControllersService,
ObjectToTreeService,
DefaultDataGeneratorService,
DialogService,
VnfPopupService,
- BasicControlGenerator,
+ PnfPopupService,
+ ControlGeneratorUtil,
AaiService,
LogService,
BasicPopupService,
DynamicInputsService,
NetworkPopupService,
NetworkControlGenerator,
- VfModulePopuopService,
+ VfModulePopupService,
+ VfModuleUpgradePopupService,
VfModuleControlGenerator,
VnfGroupControlGenerator,
DialogService,
ComponentInfoService,
NetworkStepService,
VpnStepService,
+ ModalService,
+ CreateDynamicComponentService,
{provide: NgRedux, useClass: MockAppStore}
]
});
expect(service).toBeDefined();
});
+ test('SharedTreeService upgradeBottomUp should call redux actions', () => {
+ const serviceModelId = "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
+ const node = getNodeWithData("upgrade");
+ spyOn(node.parent.data.menuActions['upgrade'], 'method');
+ service.upgradeBottomUp(node, serviceModelId);
+ expect(node.parent.data.menuActions['upgrade'].method).toBeCalledWith(node.parent, serviceModelId);
+ expect(node.parent.data.menuActions['upgrade'].method).toBeCalledTimes(2);
+
+ });
+
+ test('SharedTreeService undoUpgradeBottomUp should call redux actions', () => {
+ const serviceModelId = "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
+ const node = getNodeWithData("undoUpgrade");
+ spyOn(node.parent.data.menuActions['undoUpgrade'], 'method');
+ service.undoUpgradeBottomUp(node, serviceModelId);
+ expect(node.parent.data.menuActions['undoUpgrade'].method).toBeCalledWith(node.parent, serviceModelId);
+ expect(node.parent.data.menuActions['undoUpgrade'].method).toBeCalledTimes(2);
+ });
+
test('shouldShowDeleteInstanceWithChildrenModal should open modal if child exist with action create', () => {
jest.spyOn(MessageBoxService.openModal, 'next');
let foo = () => {
expect(MessageBoxService.openModal.next).toHaveBeenCalled();
});
- test('openAuditInfoModal should open modal for failed instance', () => {
+ each([
+ ['volumeGroups by entry name', "volumeGroups",
+ "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1", "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1"],
+ ['vfmodule by customizationUuid', "vfModules",
+ "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1"],
+ ['vnf by customizationUuid', "vnfs",
+ "1da7b585-5e61-4993-b95e-8e6606c81e45", "2017-488_PASQUALE-vPE 0"],
+ ['vnfGroups by invariantUuid because no customizationUuid', "vnfGroups",
+ "4bb2e27e-ddab-4790-9c6d-1f731bc14a45", "groupingservicefortest..ResourceInstanceGroup..0"],
+ ]).test('modelByIdentifier should success: %s', (description, modelTypeName, modelUniqueIdOrName, expectedModelCustomizationName) => {
+ let serviceModelFromHierarchy =
+ getStore().service.serviceHierarchy["1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"];
+
+ expect(service.modelByIdentifiers(serviceModelFromHierarchy, modelTypeName, modelUniqueIdOrName))
+ .toHaveProperty("modelCustomizationName", expectedModelCustomizationName);
+ });
+
+ each([
+ ['vfmodule by invariantUuid when there is customizationUuid', "vfModules", "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1"],
+ ['network by non-existing modelUniqueIdOrName', "networks", "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1"],
+ ['collectionResource has no resource', "collectionResources", "whatever"],
+ ['non-existing model-type', "fooBar", "whatever"],
+ ]).test('modelByIdentifier should fail: %s', (description, modelTypeName, modelUniqueIdOrName) => {
+ let serviceModelFromHierarchy =
+ getStore().service.serviceHierarchy["1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"];
+
+ expect(service.modelByIdentifiers(serviceModelFromHierarchy, modelTypeName, modelUniqueIdOrName))
+ .toBeUndefined();
+ });
+
+ test('openAuditInfoModalInsideIframe should open modal for failed instance', () => {
jest.spyOn(AuditInfoModalComponent.openInstanceAuditInfoModal, 'next');
- let modelInfoServiceMock: ILevelNodeInfo = new VnfModelInfo(null, null, null, null, null, null, null, null, null, null,null);
+ let modelInfoServiceMock: ILevelNodeInfo = new VnfModelInfo(null, null,
+ null, null, null, null, null,
+ null, null, null, null,null, null);
const modelMock = {"a": "a"};
const instanceMock = {"instance": "instance", "trackById": "123456789"};
const instanceTypeMock = "instanceTypeMock";
"type": instanceTypeMock
});
});
+ each([
+ ['undefined', 'Unlimited (default)', {}],
+ ['null', 'Unlimited (default)', {max:null}],
+ ['3', '3', {max:3}],
+ ]).
+ test("when there is %s max instances in model , shell return %s text", (desc, expected, model) =>{
+ expect(service.createMaximumToInstantiateModelInformationItem(model).values[0]).toBe(expected);
+ });
test('shouldShowDeleteInstanceWithChildrfenModal should not open modal if all childs with action None', () => {
let foo = () => {
let specificNetworkInfo = [
ModelInformationItem.createInstance('Network role', "network role 1, network role 2")
];
- const actualInfoModel: ComponentInfoModel = service.addGeneralInfoItems(specificNetworkInfo,ComponentInfoType.NETWORK, getNetworkModel(),getNetworkInstance());
+ const actualInfoModel: ComponentInfoModel = service.addGeneralInfoItems(specificNetworkInfo,ComponentInfoType.NETWORK, getNetworkModelInfoFromHierarchy(),getNetworkInstance());
let expectedGeneralInfo = [
- ModelInformationItem.createInstance('Model version', '37.0'),
- ModelInformationItem.createInstance('Model customization ID', '94fdd893-4a36-4d70-b16a-ec29c54c184f'),
+ ModelInformationItem.createInstance('Model version', '2.0'),
+ ModelInformationItem.createInstance('Model customization ID', 'customization-id-from-hierarchy'),
ModelInformationItem.createInstance('Instance ID', 'NETWORK4_INSTANCE_ID'),
ModelInformationItem.createInstance('Instance type', 'CONTRAIL30_HIMELGUARD'),
ModelInformationItem.createInstance('In maintenance', false),
expect(actualInfoModel.modelInfoItems).toEqual(expectedGeneralInfo);
});
+ each([
+ ['model version from hierarchy', null, getNetworkModelInfoFromHierarchy(), '2.0'],
+ ['undefined model', null, null, undefined],
+ ['model version from instance', getSelectedModelInfo(), null, '5.0'],
+ ['model version from instance', getSelectedModelInfo(), getNetworkModelInfoFromHierarchy(), '5.0'],
+ ]).
+ test ('getModelVersionEitherFromInstanceOrFromHierarchy should return %s ' ,
+ (description, instance, model, expectedResult) =>{
+ let actualResult = service.getModelVersionEitherFromInstanceOrFromHierarchy(instance, model);
+ expect(actualResult).toEqual(expectedResult);
+ });
+
+ each([
+ ['model CustomizationId from hierarchy', null, getNetworkModelInfoFromHierarchy(), 'customization-id-from-hierarchy'],
+ ['undefined model', null, null, undefined],
+ ['model CustomizationId from instance', getSelectedModelInfo(), null, 'model-customization-id-from-instance'],
+ ['model CustomizationId from instance', getSelectedModelInfo(), getNetworkModelInfoFromHierarchy(), 'model-customization-id-from-instance'],
+ ]).
+ test ('getCustomizationIdEitherFromInstanceOrFromHierarchy should return %s ' ,
+ (description, instance, model, expectedResult) =>{
+ let actualResult = service.getModelCustomizationIdEitherFromInstanceOrFromHierarchy(instance, model);
+ expect(actualResult).toEqual(expectedResult);
+ });
+
+ each([
+ ['UUID from instance', getSelectedModelInfo(), getNetworkModelInfoFromHierarchy(),"UUID-from-instance" ],
+ ['UUID from instance', getSelectedModelInfo(), null,"UUID-from-instance" ],
+ ['UUID from hierarchy', null, getNetworkModelInfoFromHierarchy(),"UUID-from-hierarchy" ],
+ ['UUID undefined', null, null, undefined],
+
+ ]).
+ test('getModelVersionIdEitherFromInstanceOrFromHierarchy should %s', (description, instance, model, expectedResult) => {
+ let actualUuid = service.getModelVersionIdEitherFromInstanceOrFromHierarchy(instance, model);
+ expect(actualUuid).toEqual(expectedResult);
+ });
+ each([
+ ['from instance', getSelectedModelInfo(), getNetworkModelInfoFromHierarchy(), 'invariantId-from-instance'],
+ ['from instance', getSelectedModelInfo(), null, 'invariantId-from-instance'],
+ ['from hierarchy', null, getNetworkModelInfoFromHierarchy(), 'invariantId-from-hierarchy'],
+ ['undefined', null, null, undefined],
+ ]).
+ test('getModelInvariantIdEitherFromInstanceOrFromHierarchy should return invariantId %s', (description, instance, model, expectedInvariantId) =>{
+ let actualInvariantId = service.getModelInvariantIdEitherFromInstanceOrFromHierarchy(instance, model);
+ expect(actualInvariantId).toEqual(expectedInvariantId);
+ });
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([
+ [false, 'method is not in menu actions', ServiceInstanceActions.None, DrawingBoardModes.EDIT, {}, true],
+ [false, 'there is no action in node', null, DrawingBoardModes.EDIT, {someMethod: "someValue"}, true],
+ [true, 'edit mode, action is none, method in menu action', ServiceInstanceActions.None, DrawingBoardModes.EDIT, {someMethod: "someValue"}, true],
+ [false, 'edit mode, action is none, method in menu action, macro service', ServiceInstanceActions.None, DrawingBoardModes.EDIT, {someMethod: "someValue"}, false],
+ [false, 'edit mode, action is not none, method in menu action', ServiceInstanceActions.Resume, DrawingBoardModes.EDIT, {someMethod: "someValue"}, true],
+ [false, 'edit mode, action is CREATE, method in menu action', ServiceInstanceActions.Resume, DrawingBoardModes.EDIT, {someMethod: "someValue"}, true]
+ ]).test('shouldShowButtonGeneric return %s if %s ', (expected, description, action, mode, menuActions, isALaCarte) => {
+ jest.spyOn(store, 'getState').mockReturnValue(<any>{
+ global: {
+ drawingBoardStatus: mode
+ },
+ service : {
+ serviceInstance: {
+ someModelId : {
+ isALaCarte
+ }
+ }
+
+ }
+ });
+ let node = <any>{
+ data:{
+ action: action,
+ menuActions: menuActions
+ },
+ };
+
+ let res = service.shouldShowButtonGeneric(node, "someMethod", "someModelId");
+ expect(res).toBe(expected);
});
+
const enableRemoveAndEditItemsDataProvider = [
['Create action CREATE mode', DrawingBoardModes.CREATE ,ServiceInstanceActions.Create, true],
['Create action VIEW mode',DrawingBoardModes.VIEW , ServiceInstanceActions.Create,false],
let res = service.shouldShowRemoveAndEdit(node);
expect(res).toBe(enabled);
});
-});
-function generateService() {
- return {
- "vnfs": {
- "2017-488_PASQUALE-vPE 0": {
- "inMaint": false,
- "rollbackOnFailure": "true",
- "originalName": "2017-488_PASQUALE-vPE 0",
- "isMissingData": false,
- "trackById": "stigekyxrqi",
- "vfModules": {
- "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
- "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0gytfi": {
- "isMissingData": false,
- "sdncPreReload": null,
- "modelInfo": {
- "modelType": "VFmodule",
- "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
- "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
- "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
- "modelVersion": "5",
- "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
- "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0"
- },
- "instanceParams": [{}],
- "trackById": "3oj23o7nupo"
+
+
+ const isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDifferProvider = [
+ ['node is part of model, but vfmodule diff by customization',
+ true, 'mDNS 01222020 0', '9fdc68e9-9f53-431c-b8a2-7e337b9a0d0a', '82160e6e-d9c4-45ef-bd19-01573ab11b61'],
+
+ ['vnf model-name not found',
+ false, 'mDNS 01222020 1', '9fdc68e9-9f53-431c-b8a2-7e337b9a0d0a', '82160e6e-d9c4-45ef-bd19-01573ab11b61'],
+
+ ['vfmodule invariant-id not found',
+ false, 'mDNS 01222020 0', 'wrong invariant-id', '82160e6e-d9c4-45ef-bd19-01573ab11b61'],
+
+ ['vfmodule customization-id match',
+ false, 'mDNS 01222020 0', '9fdc68e9-9f53-431c-b8a2-7e337b9a0d0a', 'c9b32003-febc-44e0-a97f-7630fa7fa4a0'],
+ ];
+
+ each(isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDifferProvider).test('isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDiffer: when %s should return %s', (description, expected, vnfModelName, invariantUuid, customizationUuid) => {
+ const serviceModelId : string = 'a243da28-c11e-45a8-9f26-0284a9a789bc';
+ spyOn(store, 'getState').and.returnValue({
+ service : {
+ serviceHierarchy : {
+ [serviceModelId] : {
+ vnfs : {
+ [vnfModelName] : {
+ vfModules : {
+ vfModuleModelName : {
+ invariantUuid : invariantUuid,
+ customizationUuid : customizationUuid
+ }
+ }
+ }
}
}
- },
- "vnfStoreKey": "2017-488_PASQUALE-vPE 0",
- "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
- "productFamilyId": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
- "lcpCloudRegionId": "AAIAIC25",
- "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
- "lineOfBusiness": "ONAP",
- "platformName": "xxx1",
- "modelInfo": {
- "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
- "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
- "modelName": "2017-488_PASQUALE-vPE",
- "modelVersion": "5.0",
- "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
- "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
- "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
- },
- "legacyRegion": "11111111",
- "instanceParams": [{}]
- },
- "2017-388_PASQUALE-vPE 0": {
- "inMaint": false,
- "rollbackOnFailure": "true",
- "originalName": "2017-388_PASQUALE-vPE 0",
- "isMissingData": false,
- "trackById": "nib719t5vca",
- "vfModules": {},
- "vnfStoreKey": "2017-388_PASQUALE-vPE 0",
- "productFamilyId": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
- "lcpCloudRegionId": "AAIAIC25",
- "legacyRegion": "11111",
- "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
- "platformName": "platform",
- "lineOfBusiness": "zzz1",
- "instanceParams": [{}],
- "modelInfo": {
- "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
- "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",
- "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
- },
- "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
- },
- "2017-388_PASQUALE-vPE 1": {
- "inMaint": false,
- "rollbackOnFailure": "true",
- "originalName": "2017-388_PASQUALE-vPE 1",
- "isMissingData": false,
- "trackById": "cv7l1ak8vpe",
- "vfModules": {},
- "vnfStoreKey": "2017-388_PASQUALE-vPE 1",
- "productFamilyId": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
- "lcpCloudRegionId": "AAIAIC25",
- "legacyRegion": "123",
- "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
- "platformName": "platform",
- "lineOfBusiness": "ONAP",
- "instanceParams": [{}],
- "modelInfo": {
- "modelInvariantId": "00beb8f9-6d39-452f-816d-c709b9cbb87d",
- "modelVersionId": "0903e1c0-8e03-4936-b5c2-260653b96413",
- "modelName": "2017-388_PASQUALE-vPE",
- "modelVersion": "1.0",
- "modelCustomizationId": "280dec31-f16d-488b-9668-4aae55d6648a",
- "modelCustomizationName": "2017-388_PASQUALE-vPE 1",
- "uuid": "0903e1c0-8e03-4936-b5c2-260653b96413"
- },
- "uuid": "0903e1c0-8e03-4936-b5c2-260653b96413"
+ }
}
- },
- "instanceParams": [{}],
- "validationCounter": 0,
- "existingNames": {"yoav": ""},
- "existingVNFCounterMap": {
- "69e09f68-8b63-4cc9-b9ff-860960b5db09": 1,
- "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
- "0903e1c0-8e03-4936-b5c2-260653b96413": 1
- },
- "existingVnfGroupCounterMap": {
- "daeb6568-cef8-417f-9075-ed259ce59f48": 0,
- "c2b300e6-45de-4e5e-abda-3032bee2de56": -1
- },
- "existingNetworksCounterMap": {"ddc3f20c-08b5-40fd-af72-c6d14636b986": 1},
- "networks": {
- "ExtVL 0": {
- "inMaint": false,
- "rollbackOnFailure": "true",
- "originalName": "ExtVL 0",
- "isMissingData": false,
- "trackById": "s6okajvv2n8",
- "networkStoreKey": "ExtVL 0",
- "productFamilyId": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
- "lcpCloudRegionId": "AAIAIC25",
- "legacyRegion": "12355555",
- "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
- "platformName": "platform",
- "lineOfBusiness": null,
- "instanceParams": [{}],
- "modelInfo": {
- "modelInvariantId": "379f816b-a7aa-422f-be30-17114ff50b7c",
- "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
- "modelName": "ExtVL",
- "modelVersion": "37.0",
- "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
- "modelCustomizationName": "ExtVL 0",
- "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
- },
- "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ });
+
+ const node = <any>{
+ data:{
+ modelInvariantId : '9fdc68e9-9f53-431c-b8a2-7e337b9a0d0a',
+ modelCustomizationId : 'c9b32003-febc-44e0-a97f-7630fa7fa4a0',
+ modelName : 'vfModuleModelName'
+ },
+ parent : {
+ data : {
+ modelName : "mDNS 01222020 0"
+ }
}
- },
- "vnfGroups": {
- "groupingservicefortest..ResourceInstanceGroup..0": {
- "inMaint": false,
- "rollbackOnFailure": "true",
- "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
- "isMissingData": false,
- "trackById": "se0obn93qq",
- "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
- "instanceName": "groupingservicefortestResourceInstanceGroup0",
- "instanceParams": [{}],
- "modelInfo": {
- "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
- "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
- "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
- "modelVersion": "1",
- "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
- "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
- },
- "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ };
+
+ const isDiffCustomizationUuidResponse : boolean = service.isVfmoduleAlmostPartOfModelOnlyCustomizationUuidDiffer(node, serviceModelId);
+ expect(isDiffCustomizationUuidResponse).toEqual(expected);
+ });
+
+ each([
+ [false, true, true, false],
+ [true, true, true, true],
+ [true, true, false, true],
+ [true, false, true, true],
+ [true, false, false, false],
+ ]).
+ test('when flag is %s the UpdatedLatestVersion is %s and Vfmodule not exists on hierarchy is %s isShouldShowButtonGenericMustToBeCalled should return %s', (
+ flag: boolean,
+ isThereAnUpdatedLatestVersion: boolean,
+ isVfModuleCustomizationIdNotExistsOnModel: boolean,
+ isShouldShowButtonGenericMustToBeCalled: boolean
+ ) => {
+ let node = <any> {};
+ let serviceModelId : string = '08c5fa17-769a-4231-bd92-aed4b0ed086d';
+ jest.spyOn(store, 'getState').mockReturnValue(<any>{
+ global: {
+ "flags": {
+ "FLAG_FLASH_REPLACE_VF_MODULE": flag,
+ },
+ }
+ });
+ spyOn(service, 'isThereAnUpdatedLatestVersion').and.returnValue(isThereAnUpdatedLatestVersion);
+ spyOn(service, 'isVfModuleCustomizationIdNotExistsOnModel').and.returnValue(isVfModuleCustomizationIdNotExistsOnModel);
+
+ expect(service.isVfMoudleCouldBeUpgraded(node, serviceModelId)).toEqual(isShouldShowButtonGenericMustToBeCalled);
+ });
+
+ each([
+ ['Vfm customization uuid not exists in model', 'not-existing-customization-uuid', 'service-model-id', true],
+ ['Vfm customization uuid exists in model', 'existing-customization-uuid', 'service-model-id', false]
+ ]).
+ test('%s when vfModuleNode is %s and serviceModelId is %s ', (
+ description,
+ modelCustomizationId,
+ serviceModelId: string,
+ isExistsOnHierarchy: boolean,
+ ) => {
+
+ const vfModuleNode = { data: {
+ modelCustomizationId : modelCustomizationId
+ }};
+
+ jest.spyOn(store, 'getState').mockReturnValue(<any>{
+ service : {
+ "serviceHierarchy": {
+ [serviceModelId]: {
+ "vfModules": {
+ "module-1": {
+ "customizationUuid": "3d7f41c8-333b-4fee-b50d-5687e9c2170f",
+ },
+ "module-2": {
+ "customizationUuid": "existing-customization-uuid",
+ }
+ }
+ }
+ }
}
- },
- "instanceName": "yoav",
- "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
- "subscriptionServiceType": "TYLER SILVIA",
- "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
- "productFamilyId": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
- "lcpCloudRegionId": "AAIAIC25",
- "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
- "aicZoneId": "ATL53",
- "pause": null,
- "projectName": "WATKINS",
- "rollbackOnFailure": "true",
- "bulkSize": 1,
- "aicZoneName": "AAIATLTE-ATL53",
- "owningEntityName": "WayneHolland",
- "testApi": "VNF_API",
- "isEcompGeneratedNaming": false,
- "tenantName": "USP-SIP-IC-24335-T-01",
- "modelInfo": {
- "modelInvariantId": "cdb90b57-ed78-4d44-a5b4-7f43a02ec632",
- "modelVersionId": "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
- "modelName": "action-data",
- "modelVersion": "1.0",
- "uuid": "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"
- },
- "isALaCarte": false,
- "name": "action-data",
- "version": "1.0",
- "description": "PASQUALE vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
- "category": "Network L1-3",
- "uuid": "1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
- "invariantUuid": "cdb90b57-ed78-4d44-a5b4-7f43a02ec632",
- "serviceType": "pnf",
- "serviceRole": "Testing",
- "vidNotions": {"instantiationUI": "legacy", "modelCategory": "other", "viewEditUI": "legacy"},
- "isMultiStepDesign": true
- };
-}
+ });
+ expect(service.isVfModuleCustomizationIdNotExistsOnModel(vfModuleNode, serviceModelId)).toEqual(isExistsOnHierarchy);
+
+
+ });
+
+});
function getStore() {
return {
"global": {
"name": null,
"flags": {
- "CREATE_INSTANCE_TEST": false,
"EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_SERVICE_MODEL_CACHE": true,
"FLAG_SHOW_ASSIGNMENTS": true,
"FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
- "FLAG_DEFAULT_VNF": true,
- "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": true,
"FLAG_A_LA_CARTE_AUDIT_INFO": true,
"FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST": true,
"FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS": true,
- "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": true,
"FLAG_1902_NEW_VIEW_EDIT": true,
"FLAG_1810_IDENTIFY_SERVICE_FOR_NEW_UI": false,
"FLAG_1902_VNF_GROUPING": true,
"isPermitted": true,
"cloudOwner": "irma-aic"
}, {
- "id": "229bcdc6eaeb4ca59d55221141d01f8e",
- "name": "AIN Web Tool-15-D-STTest2",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "1178612d2b394be4834ad77f567c0af2",
- "name": "AIN Web Tool-15-D-SSPtestcustome",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "19c5ade915eb461e8af52fb2fd8cd1f2",
- "name": "AIN Web Tool-15-D-UncheckedEcopm",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "de007636e25249238447264a988a927b",
- "name": "AIN Web Tool-15-D-dfsdf",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "62f29b3613634ca6a3065cbe0e020c44",
- "name": "AIN/SMS-16-D-Multiservices1",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "649289e30d3244e0b48098114d63c2aa",
- "name": "AIN Web Tool-15-D-SSPST66",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "3f21eeea6c2c486bba31dab816c05a32",
- "name": "AIN Web Tool-15-D-ASSPST47",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "f60ce21d3ee6427586cff0d22b03b773",
- "name": "CESAR-100-D-sspjg67246",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "8774659e425f479895ae091bb5d46560",
- "name": "CESAR-100-D-sspjg68359",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "624eb554b0d147c19ff8885341760481",
- "name": "AINWebTool-15-D-iftach",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "214f55f5fc414c678059c383b03e4962",
- "name": "CESAR-100-D-sspjg612401",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "c90666c291664841bb98e4d981ff1db5",
- "name": "CESAR-100-D-sspjg621340",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "ce5b6bc5c7b348e1bf4b91ac9a174278",
- "name": "sspjg621351cloned",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "b386b768a3f24c8e953abbe0b3488c02",
- "name": "AINWebTool-15-D-eteancomp",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "dc6c4dbfd225474e9deaadd34968646c",
- "name": "AINWebTool-15-T-SPFET",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "02cb5030e9914aa4be120bd9ed1e19eb",
- "name": "AINWebTool-15-X-eeweww",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "f2f3830e4c984d45bcd00e1a04158a79",
- "name": "CESAR-100-D-spjg61909",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "05b91bd5137f4929878edd965755c06d",
- "name": "CESAR-100-D-sspjg621512cloned",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "7002fbe8482d4a989ddf445b1ce336e0",
- "name": "AINWebTool-15-X-vdr",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "4008522be43741dcb1f5422022a2aa0b",
- "name": "AINWebTool-15-D-ssasa",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "f44e2e96a1b6476abfda2fa407b00169",
- "name": "AINWebTool-15-D-PFNPT",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "b69a52bec8a84669a37a1e8b72708be7",
- "name": "AINWebTool-15-X-vdre",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "fac7d9fd56154caeb9332202dcf2969f",
- "name": "AINWebTool-15-X-NONPODECOMP",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "2d34d8396e194eb49969fd61ffbff961",
- "name": "DN5242-Nov16-T5",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "cb42a77ff45b48a8b8deb83bb64acc74",
- "name": "ro-T11",
+ "id": "d0a3e3f2964542259d155a81c41aadc3",
+ "name": "test-hvf6-09",
"isPermitted": true,
"cloudOwner": "irma-aic"
}, {
"name": "ro-T112",
"isPermitted": true,
"cloudOwner": "irma-aic"
- }, {
- "id": "4914ab0ab3a743e58f0eefdacc1dde77",
- "name": "DN5242-Nov21-T1",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
- }, {
- "id": "d0a3e3f2964542259d155a81c41aadc3",
- "name": "test-hvf6-09",
- "isPermitted": true,
- "cloudOwner": "irma-aic"
}, {
"id": "cbb99fe4ada84631b7baf046b6fd2044",
"name": "DN5242-Nov16-T3",
"isPermitted": false
}, {"id": "7", "name": "vVM", "isPermitted": false}, {"id": "4", "name": "vVoiceMail", "isPermitted": false}]
},
- "aicZones": [{"id": "ATL53", "name": "AAIATLTE-ATL53"}, {"id": "ABC15", "name": "AAITESAN-ABC15"}, {
- "id": "TES36",
- "name": "ABCEETES-TES36"
- }, {"id": "ATL54", "name": "AICFTAAI-ATL54"}, {"id": "ATL43", "name": "AICLOCID-ATL43"}, {
- "id": "AMD15",
- "name": "AMDFAA01-AMD15"
- }, {"id": "AMF11", "name": "AMDOCS01-AMF11"}, {"id": "RCT1", "name": "AMSTERNL-RCT1"}, {
- "id": "AMS1",
- "name": "AMSTNLBW-AMS1"
- }, {"id": "HJH1", "name": "AOEEQQQD-HJH1"}, {"id": "HJE1", "name": "AOEEWWWD-HJE1"}, {
- "id": "MCS1",
- "name": "ASACMAMS-MCS1"
- }, {"id": "AUG1", "name": "ASDFGHJK-AUG1"}, {"id": "LUC1", "name": "ATLDFGYC-LUC1"}, {
- "id": "ATL1",
- "name": "ATLNGAMA-ATL1"
- }, {"id": "ATL2", "name": "ATLNGANW-ATL2"}, {"id": "HPO1", "name": "ATLNGAUP-HPO1"}, {
- "id": "ANI1",
- "name": "ATLNGTRE-ANI1"
- }, {"id": "ATL44", "name": "ATLSANAB-ATL44"}, {"id": "ATL56", "name": "ATLSANAC-ATL56"}, {
- "id": "ABC11",
- "name": "ATLSANAI-ABC11"
- }, {"id": "ATL34", "name": "ATLSANAI-ATL34"}, {"id": "ATL63", "name": "ATLSANEW-ATL63"}, {
- "id": "ABC12",
- "name": "ATLSECIA-ABC12"
- }, {"id": "AMD18", "name": "AUDIMA01-AMD18"}, {"id": "AVT1", "name": "AVTRFLHD-AVT1"}, {
- "id": "KIT1",
- "name": "BHYJFGLN-KIT1"
- }, {"id": "BHY17", "name": "BHYTFRF3-BHY17"}, {"id": "RTW5", "name": "BHYTFRY4-RTW5"}, {
- "id": "RTZ4",
- "name": "BHYTFRZ6-RTZ4"
- }, {"id": "RTD2", "name": "BHYTFRk4-RTD2"}, {"id": "BNA1", "name": "BNARAGBK-BNA1"}, {
- "id": "VEL1",
- "name": "BNMLKUIK-VEL1"
- }, {"id": "BOT1", "name": "BOTHWAKY-BOT1"}, {"id": "CAL33", "name": "CALIFORN-CAL33"}, {
- "id": "ATL84",
- "name": "CANTTCOC-ATL84"
- }, {"id": "HSD1", "name": "CHASKCDS-HSD1"}, {"id": "CHI1", "name": "CHILLIWE-CHI1"}, {
- "id": "XCP12",
- "name": "CHKGH123-XCP12"
- }, {"id": "JNL1", "name": "CJALSDAC-JNL1"}, {"id": "KJN1", "name": "CKALDKSA-KJN1"}, {
- "id": "CLG1",
- "name": "CLGRABAD-CLG1"
- }, {"id": "CKL1", "name": "CLKSKCKK-CKL1"}, {"id": "ATL66", "name": "CLLIAAII-ATL66"}, {
- "id": "CQK1",
- "name": "CQKSCAKK-CQK1"
- }, {"id": "CWY1", "name": "CWYMOWBS-CWY1"}, {"id": "DKJ1", "name": "DKJSJDKA-DKJ1"}, {
- "id": "DSF45",
- "name": "DSFBG123-DSF45"
- }, {"id": "DSL12", "name": "DSLFK242-DSL12"}, {"id": "FDE55", "name": "FDERT555-FDE55"}, {
- "id": "VEN2",
- "name": "FGHJUHIL-VEN2"
- }, {"id": "ATL64", "name": "FORLOAAJ-ATL64"}, {"id": "GNV1", "name": "GNVLSCTL-GNV1"}, {
- "id": "SAN22",
- "name": "GNVLSCTL-SAN22"
- }, {"id": "KAP1", "name": "HIOUYTRQ-KAP1"}, {"id": "LIS1", "name": "HOSTPROF-LIS1"}, {
- "id": "HRG1",
- "name": "HRGHRGGS-HRG1"
- }, {"id": "HST25", "name": "HSTNTX01-HST25"}, {"id": "STN27", "name": "HSTNTX01-STN27"}, {
- "id": "HST70",
- "name": "HSTNTX70-HST70"
- }, {"id": "KOR1", "name": "HYFLNBVT-KOR1"}, {"id": "RAD10", "name": "INDIPUNE-RAD10"}, {
- "id": "REL1",
- "name": "INGERFGT-REL1"
- }, {"id": "JAD1", "name": "JADECLLI-JAD1"}, {"id": "HKA1", "name": "JAKHLASS-HKA1"}, {
- "id": "JCS1",
- "name": "JCSJSCJS-JCS1"
- }, {"id": "JCV1", "name": "JCVLFLBW-JCV1"}, {"id": "KGM2", "name": "KGMTNC20-KGM2"}, {
- "id": "KJF12",
- "name": "KJFDH123-KJF12"
- }, {"id": "JGS1", "name": "KSJKKKKK-JGS1"}, {"id": "LAG1", "name": "LARGIZON-LAG1"}, {
- "id": "LAG1a",
- "name": "LARGIZON-LAG1a"
- }, {"id": "LAG45", "name": "LARGIZON-LAG1a"}, {"id": "LAG1b", "name": "LARGIZON-LAG1b"}, {
- "id": "WAN1",
- "name": "LEIWANGW-WAN1"
- }, {"id": "DSA1", "name": "LKJHGFDS-DSA1"}, {"id": "LON1", "name": "LONEENCO-LON1"}, {
- "id": "SITE",
- "name": "LONEENCO-SITE"
- }, {"id": "ZXL1", "name": "LWLWCANN-ZXL1"}, {"id": "hvf20", "name": "MDTWNJ21-hvf20"}, {
- "id": "hvf32",
- "name": "MDTWNJ21-hvf32"
- }, {"id": "AMD13", "name": "MEMATLAN-AMD13"}, {"id": "MIC54", "name": "MICHIGAN-MIC54"}, {
- "id": "MAR1",
- "name": "MNBVCXZM-MAR1"
- }, {"id": "NCA1", "name": "NCANCANN-NCA1"}, {"id": "NFT1", "name": "NFTJSSSS-NFT1"}, {
- "id": "GAR1",
- "name": "NGFVSJKO-GAR1"
- }, {"id": "NYC1", "name": "NYCMNY54-NYC1"}, {"id": "OKC1", "name": "OKCBOK55-OKC1"}, {
- "id": "OLG1",
- "name": "OLHOLHOL-OLG1"
- }, {"id": "OLK1", "name": "OLKOLKLS-OLK1"}, {"id": "NIR1", "name": "ORFLMANA-NIR1"}, {
- "id": "JAN1",
- "name": "ORFLMATT-JAN1"
- }, {"id": "ORL1", "name": "ORLDFLMA-ORL1"}, {"id": "PAR1", "name": "PARSFRCG-PAR1"}, {
- "id": "PBL1",
- "name": "PBLAPBAI-PBL1"
- }, {"id": "mac10", "name": "PKGTESTF-mac10"}, {"id": "mac20", "name": "PKGTESTF-mac20"}, {
- "id": "TIR2",
- "name": "PLKINHYI-TIR2"
- }, {"id": "IBB1", "name": "PLMKOIJU-IBB1"}, {"id": "COM1", "name": "PLMKOPIU-COM1"}, {
- "id": "POI1",
- "name": "PLMNJKIU-POI1"
- }, {"id": "PLT1", "name": "PLTNCA60-PLT1"}, {"id": "POI22", "name": "POIUY123-POI22"}, {
- "id": "DCC1",
- "name": "POIUYTGH-DCC1"
- }, {"id": "DCC1a", "name": "POIUYTGH-DCC1a"}, {"id": "DCC1b", "name": "POIUYTGH-DCC1b"}, {
- "id": "DCC2",
- "name": "POIUYTGH-DCC2"
- }, {"id": "DCC3", "name": "POIUYTGH-DCC3"}, {"id": "IAA1", "name": "QAZXSWED-IAA1"}, {
- "id": "QWE1",
- "name": "QWECLLI1-QWE1"
- }, {"id": "NUM1", "name": "QWERTYUI-NUM1"}, {"id": "RAD1", "name": "RADICAL1-RAD1"}, {
- "id": "RJN1",
- "name": "RJNRBZAW-RJN1"
- }, {"id": "SAA13", "name": "SAIT1AA9-SAA13"}, {"id": "SAA14", "name": "SAIT1AA9-SAA14"}, {
- "id": "SDD81",
- "name": "SAIT1DD6-SDD81"
- }, {"id": "SDD82", "name": "SAIT1DD9-SDD82"}, {"id": "SAA11", "name": "SAIT9AA2-SAA11"}, {
- "id": "SAA80",
- "name": "SAIT9AA3-SAA80"
- }, {"id": "SAA12", "name": "SAIT9AF8-SAA12"}, {"id": "SCC80", "name": "SAIT9CC3-SCC80"}, {
- "id": "ATL75",
- "name": "SANAAIRE-ATL75"
- }, {"id": "ICC1", "name": "SANJITAT-ICC1"}, {"id": "SCK1", "name": "SCKSCKSK-SCK1"}, {
- "id": "EHH78",
- "name": "SDCSHHH5-EHH78"
- }, {"id": "SAA78", "name": "SDCTAAA1-SAA78"}, {"id": "SAX78", "name": "SDCTAXG1-SAX78"}, {
- "id": "SBX78",
- "name": "SDCTBXG1-SBX78"
- }, {"id": "SEE78", "name": "SDCTEEE4-SEE78"}, {"id": "SGG78", "name": "SDCTGGG1-SGG78"}, {
- "id": "SXB78",
- "name": "SDCTGXB1-SXB78"
- }, {"id": "SJJ78", "name": "SDCTJJJ1-SJJ78"}, {"id": "SKK78", "name": "SDCTKKK1-SKK78"}, {
- "id": "SLF78",
- "name": "SDCTLFN1-SLF78"
- }, {"id": "SLL78", "name": "SDCTLLL1-SLL78"}, {"id": "MAD11", "name": "SDFQWGKL-MAD11"}, {
- "id": "HGD1",
- "name": "SDFQWHGD-HGD1"
- }, {"id": "SBB78", "name": "SDIT1BBB-SBB78"}, {"id": "SDG78", "name": "SDIT1BDG-SDG78"}, {
- "id": "SBU78",
- "name": "SDIT1BUB-SBU78"
- }, {"id": "SHH78", "name": "SDIT1HHH-SHH78"}, {"id": "SJU78", "name": "SDIT1JUB-SJU78"}, {
- "id": "SNA1",
- "name": "SNANTXCA-SNA1"
- }, {"id": "SAM1", "name": "SNDGCA64-SAN1"}, {"id": "SNG1", "name": "SNGPSIAU-SNG1"}, {
- "id": "SSA56",
- "name": "SSIT2AA7-SSA56"
- }, {"id": "STG1", "name": "STTGGE62-STG1"}, {"id": "STT1", "name": "STTLWA02-STT1"}, {
- "id": "SYD1",
- "name": "SYDNAUBV-SYD1"
- }, {"id": "ATL99", "name": "TEESTAAI-ATL43"}, {"id": "ATL98", "name": "TEESTAAI-ATL43"}, {
- "id": "ATL76",
- "name": "TELEPAAI-ATL76"
- }, {"id": "ABC14", "name": "TESAAISA-ABC14"}, {"id": "TAT33", "name": "TESAAISA-TAT33"}, {
- "id": "TAT34",
- "name": "TESAAISB-TAT34"
- }, {"id": "TAT37", "name": "TESAAISD-TAT37"}, {"id": "ATL62", "name": "TESSASCH-ATL62"}, {
- "id": "TLP1",
- "name": "TLPNXM18-TLP1"
- }, {"id": "SAN13", "name": "TOKYJPFA-SAN13"}, {"id": "TOK1", "name": "TOKYJPFA-TOK1"}, {
- "id": "TOL1",
- "name": "TOLDOH21-TOL1"
- }, {"id": "TOR1", "name": "TOROONXN-TOR1"}, {"id": "TOY1", "name": "TORYONNZ-TOY1"}, {
- "id": "ATL35",
- "name": "TTESSAAI-ATL35"
- }, {"id": "TUF1", "name": "TUFCLLI1-TUF1"}, {"id": "SAI1", "name": "UBEKQLPD-SAI1"}, {
- "id": "UUU4",
- "name": "UUUAAAUU-UUU4"
- }, {"id": "YYY1", "name": "UUUAIAAI-YYY1"}, {"id": "BAN1", "name": "VSDKYUTP-BAN1"}, {
- "id": "WAS1",
- "name": "WASHDCSW-WAS1"
- }, {"id": "APP1", "name": "WBHGTYUI-APP1"}, {"id": "SUL2", "name": "WERTYUJK-SUL2"}, {
- "id": "DEF2",
- "name": "WSBHGTYL-DEF2"
- }, {"id": "DHA12", "name": "WSXEDECF-DHA12"}, {"id": "MNT11", "name": "WSXEFBTH-MNT11"}, {
- "id": "RAJ1",
- "name": "YGBIJNLQ-RAJ1"
- }, {"id": "JAG1", "name": "YUDFJULP-JAG1"}, {"id": "ZEN1", "name": "ZENCLLI1-ZEN1"}, {
- "id": "ZOG1",
- "name": "ZOGASTRO-ZOG1"
- }, {"id": "SDE1", "name": "ZXCVBNMA-SDE1"}, {"id": "SIP1", "name": "ZXCVBNMK-SIP1"}, {
- "id": "JUL1",
- "name": "ZXCVBNMM-JUL1"
- }, {"id": "ERT1", "name": "ertclli1-ERT1"}, {"id": "IOP1", "name": "iopclli1-IOP1"}, {
- "id": "OPA1",
- "name": "opaclli1-OPA1"
- }, {"id": "RAI1", "name": "poiuytre-RAI1"}, {"id": "PUR1", "name": "purelyde-PUR1"}, {
- "id": "RTY1",
- "name": "rtyclli1-RTY1"
- }, {"id": "SDF1", "name": "sdfclli1-SDF1"}, {"id": "SSW56", "name": "ss8126GT-SSW56"}, {
- "id": "UIO1",
- "name": "uioclli1-UIO1"
- }],
+ "aicZones": [
+ {
+ "id": "NFT1",
+ "name": "NFTJSSSS-NFT1"
+ },
+ {
+ "id": "JAG1",
+ "name": "YUDFJULP-JAG1"
+ },
+ {
+ "id": "YYY1",
+ "name": "UUUAIAAI-YYY1"
+ },
+ {
+ "id": "AVT1",
+ "name": "AVTRFLHD-AVT1"
+ },
+ {
+ "id": "ATL34",
+ "name": "ATLSANAI-ATL34"
+ }
+ ],
"categoryParameters": {
"owningEntityList": [{
"id": "aaa1",
}
}
-function getNetworkModel(){
- return {
- "customizationUuid":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
- "name":"ExtVL",
- "version":"37.0",
- "description":"ECOMP generic virtual link (network) base type for all other service-level and global networks",
- "uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
- "invariantUuid":"379f816b-a7aa-422f-be30-17114ff50b7c",
- "max":1,
- "min":0,
- "isEcompGeneratedNaming":false,
- "type":"VL",
- "modelCustomizationName":"ExtVL 0",
- "roles":["network role 1"," network role 2"],
- "properties":{
- "network_role":"network role 1, network role 2",
- "network_assignments":
- "{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}",
- "exVL_naming":"{ecomp_generated_naming=true}","network_flows":"{is_network_policy=false, is_bound_to_vpn=false}",
- "network_homing":"{ecomp_selected_instance_node_target=false}"
- }
- };
+function getNetworkModelInfoFromHierarchy(){
+ return {
+ "version": "2.0",
+ "customizationUuid":"customization-id-from-hierarchy",
+ "uuid": "UUID-from-hierarchy",
+ "invariantUuid": "invariantId-from-hierarchy"
+ }
}
+function getSelectedModelInfo() {
+ return {
+ "instanceModelInfo": {
+ "modelVersion": "5.0",
+ "modelCustomizationId": "model-customization-id-from-instance",
+ "modelVersionId": "UUID-from-instance",
+ "modelInvariantId": "invariantId-from-instance"
+ }
+ }
+}
function getNetworkInstance() {
return {
- "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
- "modelId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
- "modelUniqueId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
- "missingData": true,
- "id": "NETWORK4_INSTANCE_ID",
- "action": "None",
- "orchStatus": "Created",
- "provStatus": "preprov",
"inMaint": false,
"instanceId": "NETWORK4_INSTANCE_ID",
"instanceType": "CONTRAIL30_HIMELGUARD",
- "instanceName": "NETWORK4_INSTANCE_NAME",
- "name": "NETWORK4_INSTANCE_NAME",
- "modelName": "ExtVL 0",
- "type": "VL",
- "isEcompGeneratedNaming": false,
- "networkStoreKey": "NETWORK4_INSTANCE_ID",
- "typeName": "N",
- "menuActions": {"edit": {}, "showAuditInfo": {}, "duplicate": {}, "remove": {}, "delete": {}, "undoDelete": {}},
- "isFailed": false,
- "statusMessage": "",
- "statusProperties": [{"key": "Prov Status:", "value": "preprov", "testId": "provStatus"}, {
- "key": "Orch Status:",
- "value": "Created",
- "testId": "orchStatus"
- }],
- "trackById": "1wvr73xl999",
- "parentType": "",
- "componentInfoType": "Network",
- "errors": {}
};
}