diff options
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule')
2 files changed, 1984 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts new file mode 100644 index 000000000..dc7452516 --- /dev/null +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts @@ -0,0 +1,1596 @@ + +import {HttpClientTestingModule, HttpTestingController} from "@angular/common/http/testing"; +import {getTestBed, TestBed} from "@angular/core/testing"; +import {MockNgRedux, NgReduxTestingModule} from "@angular-redux/store/testing"; +import {VFModuleModelInfo} from "./vfModule.model.info"; +import {DynamicInputsService} from "../../dynamicInputs.service"; +import {SharedTreeService} from "../../shared.tree.service"; +import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service"; +import {DialogService} from "ng2-bootstrap-modal"; +import {NgRedux} from "@angular-redux/store"; +import {AppState} from "../../../../../shared/store/reducers"; +import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service"; +import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service"; +import {DrawingBoardModes} from "../../../drawing-board.modes"; +import {IframeService} from "../../../../../shared/utils/iframe.service"; +import {ComponentInfoService} from "../../../component-info/component-info.service"; +import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; +import {ComponentInfoModel, ComponentInfoType} from "../../../component-info/component-info-model"; +import {AaiService} from "../../../../../shared/services/aaiService/aai.service"; +import {HttpClient, HttpHandler} from "@angular/common/http"; +import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service"; +class MockAppStore<T> { + getState() { + return { + global: { + 'drawingBoardStatus': DrawingBoardModes.CREATE + } + } + } +} + +describe('VFModule Model Info', () => { + let injector; + let _dynamicInputsService : DynamicInputsService; + let _sharedTreeService : SharedTreeService; + let vfModuleModel: VFModuleModelInfo; + let _dialogService : DialogService; + let _vfModulePopupService : VfModulePopuopService; + let _iframeService : IframeService; + let _componentInfoService : ComponentInfoService; + + beforeAll(done => (async () => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule, NgReduxTestingModule], + providers: [ + DynamicInputsService, + DialogService, + VfModulePopuopService, + SharedTreeService, + IframeService, + {provide: NgRedux, useClass: MockAppStore}, + MockNgRedux, + AaiService, + HttpClient, + HttpHandler, + FeatureFlagsService, + ComponentInfoService + ] + }); + await TestBed.compileComponents(); + + injector = getTestBed(); + _sharedTreeService = injector.get(SharedTreeService); + _componentInfoService = injector.get(ComponentInfoService) + vfModuleModel = new VFModuleModelInfo(_dynamicInputsService, _sharedTreeService, _dialogService, _vfModulePopupService, _iframeService, MockNgRedux.getInstance(),_componentInfoService); + + })().then(done).catch(done.fail)); + + + + test('VFModuleModelInfo should be defined', () => { + expect(VFModuleModelInfo).toBeDefined(); + }); + + test('VnfModelInfo should defined extra details', () => { + expect(vfModuleModel.name).toEqual('vfModules'); + expect(vfModuleModel.type).toEqual('Module'); + }); + + test('isEcompGeneratedNaming should return true if vnf has isEcompGeneratedNaming is "true" ', () => { + let isEcompGeneratedNaming : boolean = vfModuleModel.isEcompGeneratedNaming({}, { + properties: { + ecomp_generated_naming: 'true' + } + }); + expect(isEcompGeneratedNaming).toBeTruthy(); + }); + + test('isEcompGeneratedNaming should return false if isEcompGeneratedNaming is "false"', () => { + let isEcompGeneratedNaming : boolean = vfModuleModel.isEcompGeneratedNaming({}, { + properties: { + ecomp_generated_naming: 'false' + } + }); + expect(isEcompGeneratedNaming).toBeFalsy(); + }); + + test('isEcompGeneratedNaming should return false if isEcompGeneratedNaming is not defined', () => { + let isEcompGeneratedNaming : boolean = vfModuleModel.isEcompGeneratedNaming({}, { + properties: { + } + }); + expect(isEcompGeneratedNaming).toBeFalsy(); + }); + + + test('getTooltip should return "VFModule"', () => { + let tooltip: string = vfModuleModel.getTooltip(); + expect(tooltip).toEqual('VFmodule'); + }); + + test('getType should return "VFModule"', () => { + let tooltip: string = vfModuleModel.getType(); + expect(tooltip).toEqual('VFmodule'); + }); + + test('getNextLevelObject should return null', () => { + let nextLevel = vfModuleModel.getNextLevelObject(); + expect(nextLevel).toBeNull(); + }); + + test('getModel should return Module model', () => { + let model = vfModuleModel.getModel('2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1',{}, getServiceHierarchy()); + expect(model.uuid).toEqual('25284168-24bb-4698-8cb4-3f509146eca5'); + }); + + test('showNodeIcons should return false false if reachLimit of max', ()=>{ + let serviceId : string = 'servicedId'; + let node = { + parent : { + data : { + id : 'vnfId', + name : 'vnfName' + } + }, + data : { + id : 'vnfId', + name : 'vnfName' + } + }; + _sharedTreeService.setSelectedVNF({ + data : { + id : 'vfModuleId', + name : 'VfModuleName' + } + }); + jest.spyOn(vfModuleModel, 'getOptionalVNFs').mockReturnValue([]); + jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ + global : {}, + service : { + serviceHierarchy : { + 'servicedId' : { + 'vnfs' : { + 'vnfName' : { + 'properties' : { + 'max_instances' : 1 + } + } + } + } + }, + serviceInstance : { + 'servicedId' : { + 'existingVNFCounterMap' : { + 'vnfId' : 1 + }, + 'vnfs' : { + 'vnfName' :{ + + } + } + } + } + } + }); + + let result = vfModuleModel.showNodeIcons(<any>node, serviceId); + expect(result).toEqual(new AvailableNodeIcons(false , false)); + }); + + test('showNodeIcons should return true, false if reachLimit of max', ()=>{ + let serviceId : string = 'servicedId'; + let node = { + data : { + id : 'vfModuleId', + name : 'vfModuleName' + }, + parent : { + data : { + id : 'vnfId', + name : 'vnfName' + } + } + }; + jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName'); + jest.spyOn(vfModuleModel, 'getOptionalVNFs').mockReturnValue(['vnfName']); + jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ + global : {}, + service : { + serviceHierarchy : { + 'servicedId' : { + 'vnfs' : { + 'vnfName' : { + 'properties' : { + 'max_instances' : 1 + } + } + }, + 'vfModules' : { + 'vfModuleName' : { + 'properties' : { + maxCountInstances : 1 + } + } + } + } + }, + serviceInstance : { + 'servicedId' : { + 'existingVNFCounterMap' : { + 'vnfId' : 1 + }, + 'vnfs' : { + 'vnfName' :{ + 'originalName' : 'vnfName', + 'vfModules' : { + 'vfModuleName' : { + + } + } + } + } + } + } + } + }); + + let result = vfModuleModel.showNodeIcons(<any>node, 'servicedId'); + expect(result).toEqual(new AvailableNodeIcons(true , false)); + }); + + + test('showNodeIcons should return false, true if reachLimit of max', ()=>{ + let serviceId : string = 'servicedId'; + let node = { + data : { + id : 'vfModuleId', + name : 'vfModuleName' + }, + parent : { + data : { + id : 'vnfId', + name : 'vnfName' + } + } + }; + jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName'); + jest.spyOn(vfModuleModel, 'getOptionalVNFs').mockReturnValue(['vnfName']); + jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ + global : {}, + service : { + serviceHierarchy : { + 'servicedId' : { + 'vnfs' : { + 'vnfName' : { + 'properties' : { + 'max_instances' : 1 + } + } + }, + 'vfModules' : { + 'vfModuleName' : { + 'properties' : { + maxCountInstances : 2 + } + } + } + } + }, + serviceInstance : { + 'servicedId' : { + 'existingVNFCounterMap' : { + 'vnfId' : 1 + }, + 'vnfs' : { + 'vnfName' :{ + 'originalName' : 'vnfName', + 'vfModules' : { + 'vfModuleName' : { + + } + } + } + } + } + } + } + }); + + let result = vfModuleModel.showNodeIcons(<any>node, 'servicedId'); + expect(result).toEqual(new AvailableNodeIcons(true , false)); + }); + + + test('getOptionalVNFs should instance if exist', ()=>{ + let serviceId : string = 'servicedId'; + jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ + global : {}, + service : { + serviceHierarchy : { + 'servicedId' : { + 'vnfs' : { + 'vnfName' : { + 'properties' : { + 'max_instances' : 1 + } + } + }, + 'vfModules' : { + 'vfModuleName' : { + 'properties' : { + maxCountInstances : 2 + } + } + } + } + }, + serviceInstance : { + 'servicedId' : { + 'existingVNFCounterMap' : { + 'vnfId' : 1 + }, + 'vnfs' : { + 'vnfName' :{ + 'originalName' : 'vnfName', + 'vfModules' : { + 'vfModuleName' : { + + } + } + } + } + } + } + } + }); + + let node = { + data : { + id : 'vfModuleId', + name : 'vfModuleName' + }, + parent : { + data : { + id : 'vnfId', + name : 'vnfName' + } + } + }; + let result = vfModuleModel.getOptionalVNFs(serviceId , 'vnfName'); + expect(result.length).toEqual(1); + }); + + test('getNodeCount should return number of nodes', ()=>{ + let serviceId : string = 'servicedId'; + jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({ + global : {}, + service : { + serviceHierarchy : { + 'servicedId' : { + 'vnfs' : { + 'vnfName' : { + 'properties' : { + 'max_instances' : 1 + } + } + }, + 'vfModules' : { + 'vfModuleName' : { + 'properties' : { + maxCountInstances : 2 + } + } + } + } + }, + serviceInstance : { + 'servicedId' : { + 'existingVNFCounterMap' : { + 'vnfId' : 1 + }, + 'vnfs' : { + 'vnfName' :{ + 'action': 'Create', + 'originalName' : 'vnfName', + 'vfModules' : { + 'vfModuleName' : { + 'vnfModuleName_111': { + 'action': 'Create', + 'modelInfo' : { + modelVersionId : 'vfModuleId' + } + } + } + } + } + } + } + } + } + }); + + let node = { + data : { + id : 'vfModuleId', + name : 'vfModuleName', + 'action': 'Create', + }, + parent : { + data : { + id : 'vnfId', + name : 'vnfName', + 'action': 'Create', + } + } + }; + let result = vfModuleModel.getNodeCount(<any>node , serviceId); + expect(result).toEqual(1); + }); + + + test('onClickAdd should open message box if no vnfStoreKey', ()=>{ + jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue(null); + jest.spyOn(vfModuleModel, 'getDefaultVNF').mockReturnValue(null); + jest.spyOn(MessageBoxService.openModal, 'next'); + vfModuleModel.onClickAdd(<any>{}, 'serviceId'); + expect(MessageBoxService.openModal.next).toHaveBeenCalled(); + }); + + test('getMenuAction: showAuditInfoVfModule', ()=>{ + jest.spyOn(_sharedTreeService, 'isRetryMode').mockReturnValue(true); + + let node = { + data : { + "modelId": "6b528779-44a3-4472-bdff-9cd15ec93450", + "action": "Create", + "isFailed": true, + } + }; + let serviceModelId = "6b528779-44a3-4472-bdff-9cd15ec93450"; + let result = vfModuleModel.getMenuAction(<any>node, serviceModelId); + spyOn(result['showAuditInfo'], 'method'); + expect(result['showAuditInfo']).toBeDefined(); + expect(result['showAuditInfo'].visible(node)).toBeTruthy(); + expect(result['showAuditInfo'].enable(node)).toBeTruthy(); + result['showAuditInfo']['method'](node, serviceModelId); + expect(result['showAuditInfo']['method']).toHaveBeenCalledWith(node, serviceModelId); + }); + + test('Info for vfModule should be correct', () => { + const model = getVFModule(); + const instance = getVFModuleInstance(); + let actualVNFInfo = vfModuleModel.getInfoForVFModule(model,instance); + let expectedVNFInfo = [ + ModelInformationItem.createInstance('Type', 'vfModule'), + ModelInformationItem.createInstance('Model Version', '2'), + ModelInformationItem.createInstance('Model Customization ID','55b1be94-671a-403e-a26c-667e9c47d091'), + ModelInformationItem.createInstance('Instance ID', '2c1ca484-cbc2-408b-ab86-25a2c15ce280'), + ModelInformationItem.createInstance('In Maintenance', true), + ModelInformationItem.createInstance('Base Module', false), + ModelInformationItem.createInstance('Min Instances', 0), + ModelInformationItem.createInstance('Initial Instances Count',0) + ]; + expect(actualVNFInfo).toEqual(new ComponentInfoModel(ComponentInfoType.VFMODULE, expectedVNFInfo, [])); + }); + + function getVFModule(){ + return { + "uuid":"522159d5-d6e0-4c2a-aa44-5a542a12a830", + "invariantUuid":"98a7c88b-b577-476a-90e4-e25a5871e02b", + "customizationUuid":"55b1be94-671a-403e-a26c-667e9c47d091", + "description":null, + "name":"VfVmee..vmme_vlc..module-1", + "version":"2", + "modelCustomizationName":"VfVmee..vmme_vlc..module-1", + "properties":{ + "minCountInstances":0, + "maxCountInstances":null, + "initialCount":0, + "vfModuleLabel":"vmme_vlc", + "baseModule":false + }, + "inputs":{}, + "volumeGroupAllowed":false + }; + } + + function getVFModuleInstance() { + return { + "action":"None", + "instanceName":"ss820f_0918_db", + "instanceId":"2c1ca484-cbc2-408b-ab86-25a2c15ce280", + "orchStatus":"deleted", + "productFamilyId":null, + "lcpCloudRegionId":null, + "tenantId":null, + "modelInfo":{ + "modelCustomizationName":"VfVmee..vmme_vlc..module-1", + "modelCustomizationId":"b200727a-1bf9-4e7c-bd06-b5f4c9d920b9", + "modelInvariantId":"09edc9ef-85d0-4b26-80de-1f569d49e750", + "modelVersionId":"522159d5-d6e0-4c2a-aa44-5a542a12a830", + "modelType":"vfModule" + }, + "instanceType":null, + "provStatus":null, + "inMaint":true, + "uuid":"522159d5-d6e0-4c2a-aa44-5a542a12a830", + "originalName":"VfVmee..vmme_vlc..module-1", + "legacyRegion":null, + "lineOfBusiness":null, + "platformName":null, + "trackById":"vf_vmee0..VfVmee..vmme_vlc..module-1:008", + "isBase":false, + "volumeGroupName":null + }; + } + + + function getServiceHierarchy(){ + return { + "service": { + "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450", + "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", + "name": "action-data", + "version": "1.0", + "toscaModelURL": null, + "category": "", + "serviceType": "", + "serviceRole": "", + "description": "", + "serviceEcompNaming": "false", + "instantiationType": "Macro", + "inputs": { + "2017488_adiodvpe0_ASN": { + "type": "string", + "description": "AV/PE", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "AV_vPE" + } + }, + "vidNotions": { + "instantiationUI": "legacy", + "modelCategory": "other" + } + }, + "vnfs": { + "2017-388_ADIOD-vPE 1": { + "uuid": "0903e1c0-8e03-4936-b5c2-260653b96413", + "invariantUuid": "00beb8f9-6d39-452f-816d-c709b9cbb87d", + "description": "Name ADIOD vPE Description The provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM", + "name": "2017-388_ADIOD-vPE", + "version": "1.0", + "customizationUuid": "280dec31-f16d-488b-9668-4aae55d6648a", + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "ATLMY8GA" + }, + "ASN": { + "type": "string", + "description": "AV/PE", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "AV_vPE" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "mtnj309me6" + } + }, + "commands": { + "vnf_config_template_version": { + "displayName": "vnf_config_template_version", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_config_template_version" + }, + "bandwidth_units": { + "displayName": "bandwidth_units", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth_units" + }, + "bandwidth": { + "displayName": "bandwidth", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth" + }, + "AIC_CLLI": { + "displayName": "AIC_CLLI", + "command": "get_input", + "inputName": "2017488_adiodvpe0_AIC_CLLI" + }, + "ASN": { + "displayName": "ASN", + "command": "get_input", + "inputName": "2017488_adiodvpe0_ASN" + }, + "vnf_instance_name": { + "displayName": "vnf_instance_name", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_instance_name" + } + }, + "properties": { + "vmxvre_retype": "RE-VMX", + "vnf_config_template_version": "get_input:2017488_adiodvpe0_vnf_config_template_version", + "sriov44_net_id": "48d399b3-11ee-48a8-94d2-f0ea94d6be8d", + "int_ctl_net_id": "2f323477-6936-4d01-ac53-d849430281d9", + "vmxvpfe_sriov41_0_port_mac": "00:11:22:EF:AC:DF", + "int_ctl_net_name": "VMX-INTXI", + "vmx_int_ctl_prefix": "10.0.0.10", + "sriov43_net_id": "da349ca1-6de9-4548-be88-2d88e99bfef5", + "sriov42_net_id": "760669ba-013d-4d9b-b0e7-4151fe2e6279", + "sriov41_net_id": "25ad52d5-c165-40f8-b3b0-ddfc2373280a", + "nf_type": "vPE", + "vmxvpfe_int_ctl_ip_1": "10.0.0.10", + "is_AVPN_service": "false", + "vmx_RSG_name": "vREXI-affinity", + "vmx_int_ctl_forwarding": "l2", + "vmxvre_oam_ip_0": "10.0.0.10", + "vmxvpfe_sriov44_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_sriov41_0_port_vlanstrip": "false", + "vmxvpfe_sriov42_0_port_vlanfilter": "4001", + "vmxvpfe_sriov44_0_port_unknownunicastallow": "true", + "vmxvre_image_name_0": "VRE-ENGINE_17.2-S2.1.qcow2", + "vmxvre_instance": "0", + "vmxvpfe_sriov43_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvre_flavor_name": "ns.c1r16d32.v5", + "vmxvpfe_volume_size_0": "40.0", + "vmxvpfe_sriov43_0_port_vlanfilter": "4001", + "nf_naming": "{ecomp_generated_naming=false}", + "nf_naming_code": "Navneet", + "vmxvre_name_0": "vREXI", + "vmxvpfe_sriov42_0_port_vlanstrip": "false", + "vmxvpfe_volume_name_0": "vPFEXI_FBVolume", + "vmx_RSG_id": "bd89a33c-13c3-4a04-8fde-1a57eb123141", + "vmxvpfe_image_name_0": "VPE_ROUTING-ENGINE_17.2R1-S2.1.qcow2", + "vmxvpfe_sriov43_0_port_unknownunicastallow": "true", + "vmxvpfe_sriov44_0_port_unknownmulticastallow": "true", + "vmxvre_console": "vidconsole", + "vmxvpfe_sriov44_0_port_vlanfilter": "4001", + "vmxvpfe_sriov42_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_volume_id_0": "47cede15-da2f-4397-a101-aa683220aff3", + "vmxvpfe_sriov42_0_port_unknownmulticastallow": "true", + "vmxvpfe_sriov44_0_port_vlanstrip": "false", + "vf_module_id": "123", + "nf_function": "JAI", + "vmxvpfe_sriov43_0_port_unknownmulticastallow": "true", + "vmxvre_int_ctl_ip_0": "10.0.0.10", + "ecomp_generated_naming": "false", + "AIC_CLLI": "get_input:2017488_adiodvpe0_AIC_CLLI", + "vnf_name": "mtnj309me6vre", + "vmxvpfe_sriov41_0_port_unknownunicastallow": "true", + "vmxvre_volume_type_1": "HITACHI", + "vmxvpfe_sriov44_0_port_broadcastallow": "true", + "vmxvre_volume_type_0": "HITACHI", + "vmxvpfe_volume_type_0": "HITACHI", + "vmxvpfe_sriov43_0_port_broadcastallow": "true", + "bandwidth_units": "get_input:adiodvpe0_bandwidth_units", + "vnf_id": "123", + "vmxvre_oam_prefix": "24", + "availability_zone_0": "mtpocfo-kvm-az01", + "ASN": "get_input:2017488_adiodvpe0_ASN", + "vmxvre_chassis_i2cid": "161", + "vmxvpfe_name_0": "vPFEXI", + "bandwidth": "get_input:adiodvpe0_bandwidth", + "availability_zone_max_count": "1", + "vmxvre_volume_size_0": "45.0", + "vmxvre_volume_size_1": "50.0", + "vmxvpfe_sriov42_0_port_broadcastallow": "true", + "vmxvre_oam_gateway": "10.0.0.10", + "vmxvre_volume_name_1": "vREXI_FAVolume", + "vmxvre_ore_present": "0", + "vmxvre_volume_name_0": "vREXI_FBVolume", + "vmxvre_type": "0", + "vnf_instance_name": "get_input:2017488_adiodvpe0_vnf_instance_name", + "vmxvpfe_sriov41_0_port_unknownmulticastallow": "true", + "oam_net_id": "b95eeb1d-d55d-4827-abb4-8ebb94941429", + "vmx_int_ctl_len": "24", + "vmxvpfe_sriov43_0_port_vlanstrip": "false", + "vmxvpfe_sriov41_0_port_broadcastallow": "true", + "vmxvre_volume_id_1": "6e86797e-03cd-4fdc-ba72-2957119c746d", + "vmxvpfe_sriov41_0_port_vlanfilter": "4001", + "nf_role": "Testing", + "vmxvre_volume_id_0": "f4eacb79-f687-4e9d-b760-21847c8bb15a", + "vmxvpfe_sriov42_0_port_unknownunicastallow": "true", + "vmxvpfe_flavor_name": "ns.c20r16d25.v5" + }, + "type": "VF", + "modelCustomizationName": "2017-388_ADIOD-vPE 1", + "vfModules": {}, + "volumeGroups": {}, + "vfcInstanceGroups": {} + }, + "2017-388_ADIOD-vPE 0": { + "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168", + "invariantUuid": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8", + "description": "Name ADIOD vPE Description The provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM", + "name": "2017-388_ADIOD-vPE", + "version": "4.0", + "customizationUuid": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c", + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "ATLMY8GA" + }, + "ASN": { + "type": "string", + "description": "AV/PE", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "AV_vPE" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "mtnj309me6" + } + }, + "commands": { + "vnf_config_template_version": { + "displayName": "vnf_config_template_version", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_config_template_version" + }, + "bandwidth_units": { + "displayName": "bandwidth_units", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth_units" + }, + "bandwidth": { + "displayName": "bandwidth", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth" + }, + "AIC_CLLI": { + "displayName": "AIC_CLLI", + "command": "get_input", + "inputName": "2017488_adiodvpe0_AIC_CLLI" + }, + "ASN": { + "displayName": "ASN", + "command": "get_input", + "inputName": "2017488_adiodvpe0_ASN" + }, + "vnf_instance_name": { + "displayName": "vnf_instance_name", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_instance_name" + } + }, + "properties": { + "vmxvre_retype": "RE-VMX", + "vnf_config_template_version": "get_input:2017488_adiodvpe0_vnf_config_template_version", + "sriov44_net_id": "48d399b3-11ee-48a8-94d2-f0ea94d6be8d", + "int_ctl_net_id": "2f323477-6936-4d01-ac53-d849430281d9", + "vmxvpfe_sriov41_0_port_mac": "00:11:22:EF:AC:DF", + "int_ctl_net_name": "VMX-INTXI", + "vmx_int_ctl_prefix": "10.0.0.10", + "sriov43_net_id": "da349ca1-6de9-4548-be88-2d88e99bfef5", + "sriov42_net_id": "760669ba-013d-4d9b-b0e7-4151fe2e6279", + "sriov41_net_id": "25ad52d5-c165-40f8-b3b0-ddfc2373280a", + "nf_type": "vPE", + "vmxvpfe_int_ctl_ip_1": "10.0.0.10", + "is_AVPN_service": "false", + "vmx_RSG_name": "vREXI-affinity", + "vmx_int_ctl_forwarding": "l2", + "vmxvre_oam_ip_0": "10.0.0.10", + "vmxvpfe_sriov44_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_sriov41_0_port_vlanstrip": "false", + "vmxvpfe_sriov42_0_port_vlanfilter": "4001", + "vmxvpfe_sriov44_0_port_unknownunicastallow": "true", + "vmxvre_image_name_0": "VRE-ENGINE_17.2-S2.1.qcow2", + "vmxvre_instance": "0", + "vmxvpfe_sriov43_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvre_flavor_name": "ns.c1r16d32.v5", + "vmxvpfe_volume_size_0": "40.0", + "vmxvpfe_sriov43_0_port_vlanfilter": "4001", + "nf_naming": "{ecomp_generated_naming=false}", + "nf_naming_code": "Navneet", + "vmxvre_name_0": "vREXI", + "vmxvpfe_sriov42_0_port_vlanstrip": "false", + "vmxvpfe_volume_name_0": "vPFEXI_FBVolume", + "vmx_RSG_id": "bd89a33c-13c3-4a04-8fde-1a57eb123141", + "vmxvpfe_image_name_0": "VPE_ROUTING-ENGINE_17.2R1-S2.1.qcow2", + "vmxvpfe_sriov43_0_port_unknownunicastallow": "true", + "vmxvpfe_sriov44_0_port_unknownmulticastallow": "true", + "vmxvre_console": "vidconsole", + "vmxvpfe_sriov44_0_port_vlanfilter": "4001", + "vmxvpfe_sriov42_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_volume_id_0": "47cede15-da2f-4397-a101-aa683220aff3", + "vmxvpfe_sriov42_0_port_unknownmulticastallow": "true", + "min_instances": "1", + "vmxvpfe_sriov44_0_port_vlanstrip": "false", + "vf_module_id": "123", + "nf_function": "JAI", + "vmxvpfe_sriov43_0_port_unknownmulticastallow": "true", + "vmxvre_int_ctl_ip_0": "10.0.0.10", + "ecomp_generated_naming": "false", + "AIC_CLLI": "get_input:2017488_adiodvpe0_AIC_CLLI", + "vnf_name": "mtnj309me6vre", + "vmxvpfe_sriov41_0_port_unknownunicastallow": "true", + "vmxvre_volume_type_1": "HITACHI", + "vmxvpfe_sriov44_0_port_broadcastallow": "true", + "vmxvre_volume_type_0": "HITACHI", + "vmxvpfe_volume_type_0": "HITACHI", + "vmxvpfe_sriov43_0_port_broadcastallow": "true", + "bandwidth_units": "get_input:adiodvpe0_bandwidth_units", + "vnf_id": "123", + "vmxvre_oam_prefix": "24", + "availability_zone_0": "mtpocfo-kvm-az01", + "ASN": "get_input:2017488_adiodvpe0_ASN", + "vmxvre_chassis_i2cid": "161", + "vmxvpfe_name_0": "vPFEXI", + "bandwidth": "get_input:adiodvpe0_bandwidth", + "availability_zone_max_count": "1", + "vmxvre_volume_size_0": "45.0", + "vmxvre_volume_size_1": "50.0", + "vmxvpfe_sriov42_0_port_broadcastallow": "true", + "vmxvre_oam_gateway": "10.0.0.10", + "vmxvre_volume_name_1": "vREXI_FAVolume", + "vmxvre_ore_present": "0", + "vmxvre_volume_name_0": "vREXI_FBVolume", + "vmxvre_type": "0", + "vnf_instance_name": "get_input:2017488_adiodvpe0_vnf_instance_name", + "vmxvpfe_sriov41_0_port_unknownmulticastallow": "true", + "oam_net_id": "b95eeb1d-d55d-4827-abb4-8ebb94941429", + "vmx_int_ctl_len": "24", + "vmxvpfe_sriov43_0_port_vlanstrip": "false", + "vmxvpfe_sriov41_0_port_broadcastallow": "true", + "vmxvre_volume_id_1": "6e86797e-03cd-4fdc-ba72-2957119c746d", + "vmxvpfe_sriov41_0_port_vlanfilter": "4001", + "nf_role": "Testing", + "vmxvre_volume_id_0": "f4eacb79-f687-4e9d-b760-21847c8bb15a", + "vmxvpfe_sriov42_0_port_unknownunicastallow": "true", + "vmxvpfe_flavor_name": "ns.c20r16d25.v5" + }, + "type": "VF", + "modelCustomizationName": "2017-388_ADIOD-vPE 0", + "vfModules": {}, + "volumeGroups": {}, + "vfcInstanceGroups": {} + }, + "2017-488_ADIOD-vPE 0": { + "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09", + "invariantUuid": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8", + "description": "Name ADIOD vPE Description The provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM", + "name": "2017-488_ADIOD-vPE", + "version": "5.0", + "customizationUuid": "1da7b585-5e61-4993-b95e-8e6606c81e45", + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "ATLMY8GA" + }, + "ASN": { + "type": "string", + "description": "AV/PE", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "AV_vPE" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": null, + "constraints": [], + "required": true, + "default": "mtnj309me6" + } + }, + "commands": { + "vnf_config_template_version": { + "displayName": "vnf_config_template_version", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_config_template_version" + }, + "bandwidth_units": { + "displayName": "bandwidth_units", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth_units" + }, + "bandwidth": { + "displayName": "bandwidth", + "command": "get_input", + "inputName": "adiodvpe0_bandwidth" + }, + "AIC_CLLI": { + "displayName": "AIC_CLLI", + "command": "get_input", + "inputName": "2017488_adiodvpe0_AIC_CLLI" + }, + "ASN": { + "displayName": "ASN", + "command": "get_input", + "inputName": "2017488_adiodvpe0_ASN" + }, + "vnf_instance_name": { + "displayName": "vnf_instance_name", + "command": "get_input", + "inputName": "2017488_adiodvpe0_vnf_instance_name" + } + }, + "properties": { + "vmxvre_retype": "RE-VMX", + "vnf_config_template_version": "get_input:2017488_adiodvpe0_vnf_config_template_version", + "sriov44_net_id": "48d399b3-11ee-48a8-94d2-f0ea94d6be8d", + "int_ctl_net_id": "2f323477-6936-4d01-ac53-d849430281d9", + "vmxvpfe_sriov41_0_port_mac": "00:11:22:EF:AC:DF", + "int_ctl_net_name": "VMX-INTXI", + "vmx_int_ctl_prefix": "10.0.0.10", + "sriov43_net_id": "da349ca1-6de9-4548-be88-2d88e99bfef5", + "sriov42_net_id": "760669ba-013d-4d9b-b0e7-4151fe2e6279", + "sriov41_net_id": "25ad52d5-c165-40f8-b3b0-ddfc2373280a", + "nf_type": "vPE", + "vmxvpfe_int_ctl_ip_1": "10.0.0.10", + "is_AVPN_service": "false", + "vmx_RSG_name": "vREXI-affinity", + "vmx_int_ctl_forwarding": "l2", + "vmxvre_oam_ip_0": "10.0.0.10", + "vmxvpfe_sriov44_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_sriov41_0_port_vlanstrip": "false", + "vmxvpfe_sriov42_0_port_vlanfilter": "4001", + "vmxvpfe_sriov44_0_port_unknownunicastallow": "true", + "vmxvre_image_name_0": "VRE-ENGINE_17.2-S2.1.qcow2", + "vmxvre_instance": "0", + "vmxvpfe_sriov43_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvre_flavor_name": "ns.c1r16d32.v5", + "vmxvpfe_volume_size_0": "40.0", + "vmxvpfe_sriov43_0_port_vlanfilter": "4001", + "nf_naming": "{ecomp_generated_naming=false}", + "nf_naming_code": "Navneet", + "vmxvre_name_0": "vREXI", + "vmxvpfe_sriov42_0_port_vlanstrip": "false", + "vmxvpfe_volume_name_0": "vPFEXI_FBVolume", + "max_instances": "3", + "vmx_RSG_id": "bd89a33c-13c3-4a04-8fde-1a57eb123141", + "vmxvpfe_image_name_0": "VPE_ROUTING-ENGINE_17.2R1-S2.1.qcow2", + "vmxvpfe_sriov43_0_port_unknownunicastallow": "true", + "vmxvpfe_sriov44_0_port_unknownmulticastallow": "true", + "vmxvre_console": "vidconsole", + "vmxvpfe_sriov44_0_port_vlanfilter": "4001", + "vmxvpfe_sriov42_0_port_mac": "00:11:22:EF:AC:DF", + "vmxvpfe_volume_id_0": "47cede15-da2f-4397-a101-aa683220aff3", + "vmxvpfe_sriov42_0_port_unknownmulticastallow": "true", + "min_instances": "1", + "vmxvpfe_sriov44_0_port_vlanstrip": "false", + "vf_module_id": "123", + "nf_function": "JAI", + "vmxvpfe_sriov43_0_port_unknownmulticastallow": "true", + "vmxvre_int_ctl_ip_0": "10.0.0.10", + "ecomp_generated_naming": "false", + "AIC_CLLI": "get_input:2017488_adiodvpe0_AIC_CLLI", + "vnf_name": "mtnj309me6vre", + "vmxvpfe_sriov41_0_port_unknownunicastallow": "true", + "vmxvre_volume_type_1": "HITACHI", + "vmxvpfe_sriov44_0_port_broadcastallow": "true", + "vmxvre_volume_type_0": "HITACHI", + "vmxvpfe_volume_type_0": "HITACHI", + "vmxvpfe_sriov43_0_port_broadcastallow": "true", + "bandwidth_units": "get_input:adiodvpe0_bandwidth_units", + "vnf_id": "123", + "vmxvre_oam_prefix": "24", + "availability_zone_0": "mtpocfo-kvm-az01", + "ASN": "get_input:2017488_adiodvpe0_ASN", + "vmxvre_chassis_i2cid": "161", + "vmxvpfe_name_0": "vPFEXI", + "bandwidth": "get_input:adiodvpe0_bandwidth", + "availability_zone_max_count": "1", + "vmxvre_volume_size_0": "45.0", + "vmxvre_volume_size_1": "50.0", + "vmxvpfe_sriov42_0_port_broadcastallow": "true", + "vmxvre_oam_gateway": "10.0.0.10", + "vmxvre_volume_name_1": "vREXI_FAVolume", + "vmxvre_ore_present": "0", + "vmxvre_volume_name_0": "vREXI_FBVolume", + "vmxvre_type": "0", + "vnf_instance_name": "get_input:2017488_adiodvpe0_vnf_instance_name", + "vmxvpfe_sriov41_0_port_unknownmulticastallow": "true", + "oam_net_id": "b95eeb1d-d55d-4827-abb4-8ebb94941429", + "vmx_int_ctl_len": "24", + "vmxvpfe_sriov43_0_port_vlanstrip": "false", + "vmxvpfe_sriov41_0_port_broadcastallow": "true", + "vmxvre_volume_id_1": "6e86797e-03cd-4fdc-ba72-2957119c746d", + "vmxvpfe_sriov41_0_port_vlanfilter": "4001", + "nf_role": "Testing", + "vmxvre_volume_id_0": "f4eacb79-f687-4e9d-b760-21847c8bb15a", + "vmxvpfe_sriov42_0_port_unknownunicastallow": "true", + "vmxvpfe_flavor_name": "ns.c20r16d25.v5" + }, + "type": "VF", + "modelCustomizationName": "2017-488_ADIOD-vPE 0", + "vfModules": { + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": { + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", + "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1", + "customizationUuid": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vRE_BV", + "baseModule": false + }, + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_config_template_version" + }, + "fromInputName": "2017488_adiodvpe0_vnf_config_template_version", + "constraints": null, + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth_units" + }, + "fromInputName": "adiodvpe0_bandwidth_units", + "constraints": null, + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth" + }, + "fromInputName": "adiodvpe0_bandwidth", + "constraints": null, + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "AIC_CLLI" + }, + "fromInputName": "2017488_adiodvpe0_AIC_CLLI", + "constraints": null, + "required": true, + "default": "ATLMY8GA" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_instance_name" + }, + "fromInputName": "2017488_adiodvpe0_vnf_instance_name", + "constraints": null, + "required": true, + "default": "mtnj309me6" + } + }, + "volumeGroupAllowed": true + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": { + "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db", + "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091", + "customizationUuid": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3", + "description": null, + "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0", + "version": "5", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0", + "properties": { + "minCountInstances": 1, + "maxCountInstances": 1, + "initialCount": 1, + "vfModuleLabel": "ADIOD_base_vPE_BV", + "baseModule": true + }, + "inputs": {}, + "volumeGroupAllowed": false + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": { + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339", + "customizationUuid": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vPFE_BV", + "baseModule": false + }, + "inputs": {}, + "volumeGroupAllowed": true + } + }, + "volumeGroups": { + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": { + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", + "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1", + "customizationUuid": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vRE_BV", + "baseModule": false + }, + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_config_template_version" + }, + "fromInputName": "2017488_adiodvpe0_vnf_config_template_version", + "constraints": null, + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth_units" + }, + "fromInputName": "adiodvpe0_bandwidth_units", + "constraints": null, + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth" + }, + "fromInputName": "adiodvpe0_bandwidth", + "constraints": null, + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "AIC_CLLI" + }, + "fromInputName": "2017488_adiodvpe0_AIC_CLLI", + "constraints": null, + "required": true, + "default": "ATLMY8GA" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_instance_name" + }, + "fromInputName": "2017488_adiodvpe0_vnf_instance_name", + "constraints": null, + "required": true, + "default": "mtnj309me6" + } + } + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": { + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339", + "customizationUuid": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vPFE_BV", + "baseModule": false + }, + "inputs": {} + } + }, + "vfcInstanceGroups": {} + } + }, + "networks": {}, + "collectionResource": {}, + "configurations": {}, + "fabricConfigurations": {}, + "serviceProxies": {}, + "vfModules": { + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": { + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", + "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1", + "customizationUuid": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vRE_BV", + "baseModule": false + }, + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_config_template_version" + }, + "fromInputName": "2017488_adiodvpe0_vnf_config_template_version", + "constraints": null, + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth_units" + }, + "fromInputName": "adiodvpe0_bandwidth_units", + "constraints": null, + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth" + }, + "fromInputName": "adiodvpe0_bandwidth", + "constraints": null, + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "AIC_CLLI" + }, + "fromInputName": "2017488_adiodvpe0_AIC_CLLI", + "constraints": null, + "required": true, + "default": "ATLMY8GA" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_instance_name" + }, + "fromInputName": "2017488_adiodvpe0_vnf_instance_name", + "constraints": null, + "required": true, + "default": "mtnj309me6" + } + }, + "volumeGroupAllowed": true + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": { + "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db", + "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091", + "customizationUuid": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3", + "description": null, + "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0", + "version": "5", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0", + "properties": { + "minCountInstances": 1, + "maxCountInstances": 1, + "initialCount": 1, + "vfModuleLabel": "ADIOD_base_vPE_BV", + "baseModule": true + }, + "inputs": {}, + "volumeGroupAllowed": false + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": { + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339", + "customizationUuid": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vPFE_BV", + "baseModule": false + }, + "inputs": {}, + "volumeGroupAllowed": true + } + }, + "volumeGroups": { + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": { + "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", + "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1", + "customizationUuid": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vRE_BV", + "baseModule": false + }, + "inputs": { + "vnf_config_template_version": { + "type": "string", + "description": "VPE Software Version", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_config_template_version" + }, + "fromInputName": "2017488_adiodvpe0_vnf_config_template_version", + "constraints": null, + "required": true, + "default": "17.2" + }, + "bandwidth_units": { + "type": "string", + "description": "Units of bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth_units" + }, + "fromInputName": "adiodvpe0_bandwidth_units", + "constraints": null, + "required": true, + "default": "Gbps" + }, + "bandwidth": { + "type": "string", + "description": "Requested VPE bandwidth", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "bandwidth" + }, + "fromInputName": "adiodvpe0_bandwidth", + "constraints": null, + "required": true, + "default": "10" + }, + "AIC_CLLI": { + "type": "string", + "description": "AIC Site CLLI", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "AIC_CLLI" + }, + "fromInputName": "2017488_adiodvpe0_AIC_CLLI", + "constraints": null, + "required": true, + "default": "ATLMY8GA" + }, + "vnf_instance_name": { + "type": "string", + "description": "The hostname assigned to the vpe.", + "entry_schema": null, + "inputProperties": { + "sourceType": "HEAT", + "vfModuleLabel": "ADIOD_vRE_BV", + "paramName": "vnf_instance_name" + }, + "fromInputName": "2017488_adiodvpe0_vnf_instance_name", + "constraints": null, + "required": true, + "default": "mtnj309me6" + } + } + }, + "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": { + "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a", + "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339", + "customizationUuid": "3cd946bb-50e0-40d8-96d3-c9023520b557", + "description": null, + "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "version": "6", + "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ADIOD_vPFE_BV", + "baseModule": false + }, + "inputs": {} + } + }, + "pnfs": {} + } + } +}); diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts new file mode 100644 index 000000000..7db3d906e --- /dev/null +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts @@ -0,0 +1,388 @@ +import {DynamicInputsService} from "../../dynamicInputs.service"; +import {ILevelNodeInfo} from "../basic.model.info"; +import * as _ from "lodash"; +import {VNFModel} from "../../../../../shared/models/vnfModel"; +import {SharedTreeService} from "../../shared.tree.service"; +import {VfModuleTreeNode} from "../../../../../shared/models/vfModuleTreeNode"; +import {VfModuleInstance} from "../../../../../shared/models/vfModuleInstance"; +import {VfModule} from "../../../../../shared/models/vfModule"; +import {NgRedux} from "@angular-redux/store"; +import {ITreeNode} from "angular-tree-component/dist/defs/api"; +import { + GenericFormPopupComponent, + PopupType +} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; +import {DialogService} from "ng2-bootstrap-modal"; +import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service"; +import {AppState} from "../../../../../shared/store/reducers"; +import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data"; +import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service"; +import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service"; +import {IframeService} from "../../../../../shared/utils/iframe.service"; +import { + deleteActionVfModuleInstance, + removeVfModuleInstance, + undoDeleteVfModuleInstance, + updateVFModulePosition +} from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions"; +import {ComponentInfoService} from "../../../component-info/component-info.service"; +import {ComponentInfoModel, ComponentInfoType} from "../../../component-info/component-info-model"; +import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; + +export class VFModuleModelInfo implements ILevelNodeInfo { + constructor(private _dynamicInputsService: DynamicInputsService, + private _sharedTreeService: SharedTreeService, + private _dialogService: DialogService, + private _vfModulePopupService: VfModulePopuopService, + private _iframeService: IframeService, + private _store: NgRedux<AppState>, + private _componentInfoService: ComponentInfoService) { + } + + name: string = 'vfModules'; + type: string = 'Module'; + typeName: string = 'M'; + + /*********************************************************** + * return if user should provide instance name or not. + * get info from parent (VNF) + * @param currentModel - current Model object + * @param parentModel - current parent Model object + ************************************************************/ + isEcompGeneratedNaming(currentModel, parentModel): boolean { + const ecompGeneratedNaming = !_.isNil(parentModel.properties) ? parentModel.properties.ecomp_generated_naming : undefined; + return ecompGeneratedNaming === "true"; + } + + /*********************************************************** + * return model dynamic inputs + * @param currentModel - current Model object + ************************************************************/ + updateDynamicInputsDataFromModel = (currentModel): any => { + let displayInputs = _.isNil(currentModel) ? [] : currentModel.inputs; + return _.isEmpty(displayInputs) ? [] : this._dynamicInputsService.getArbitraryInputs(displayInputs); + }; + + /*********************************************************** + * return vfModule model + * @param vfModuleModelId - current Model id + * @param instance + * @param serviceHierarchy - serviceHierarchy + ************************************************************/ + getModel = (vfModuleModelId: string, instance, serviceHierarchy): any => { + if (!_.isNil(serviceHierarchy)) { + if (!_.isNil(serviceHierarchy[this.name]) && !_.isNil(serviceHierarchy[this.name][vfModuleModelId])) { + return serviceHierarchy[this.name][vfModuleModelId]; + } + } + return {}; + }; + + createNode(instance: VfModuleInstance, currentModel: VfModule, parentModel: VNFModel, modelName: string, index: number): VfModuleTreeNode { + let dynamicModelName = Object.keys(instance)[index]; + instance = instance[Object.keys(instance)[index]]; + const isEcompGeneratedNaming: boolean = this.isEcompGeneratedNaming(currentModel, parentModel); + + const dynamicInputs = this.updateDynamicInputsDataFromModel(currentModel); + let newVfModule: VfModuleTreeNode = new VfModuleTreeNode(instance, currentModel, modelName, dynamicInputs, isEcompGeneratedNaming, dynamicModelName); + + newVfModule.missingData = this._sharedTreeService.hasMissingData(instance, newVfModule.dynamicInputs, isEcompGeneratedNaming, []); + newVfModule.typeName = this.typeName; + newVfModule.menuActions = this.getMenuAction(<any>newVfModule, currentModel.uuid); + newVfModule.isFailed = _.isNil(instance.isFailed) ? false : instance.isFailed; + newVfModule.statusMessage = !_.isNil(instance.statusMessage) ? instance.statusMessage: ""; + + newVfModule = this._sharedTreeService.addingStatusProperty(newVfModule); + return newVfModule; + } + + createInstanceTreeNode(instance: VfModuleInstance, currentModel: VfModule, parentModel: VNFModel, modelName: string): VfModuleTreeNode | VfModuleTreeNode[] { + let numberOfChilds = Object.keys(instance).length; + if (numberOfChilds > 1) { + let result: VfModuleTreeNode[] = []; + for (let i = 0; i < numberOfChilds; i++) { + result.push(this.createNode(instance, currentModel, parentModel, modelName, i)); + } + return result; + } else { + return this.createNode(instance, currentModel, parentModel, modelName, 0); + } + } + + /*********************************************************** + * return next level object (null because is last level) + ************************************************************/ + getNextLevelObject(): any { + return null; + } + + getTooltip = (): string => 'VFmodule'; + + getType = (): string => 'VFmodule'; + + /*********************************************************** + * return if instance has missing data + * @param instance - vnf instance + * @param dynamicInputs + * @param isEcompGeneratedNaming + ************************************************************/ + hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean { + return this._sharedTreeService.hasMissingData(instance, dynamicInputs, isEcompGeneratedNaming, []); + } + + + /*********************************************************** + * return if instance has missing data + * @param node - VFModule node + * @param serviceModelId - current service id + ************************************************************/ + onClickAdd(node: ITreeNode, serviceModelId: string): void { + const vnfStoreKey = this._sharedTreeService.getSelectedVNF() || this.getDefaultVNF(node.parent, serviceModelId); + if (vnfStoreKey) { + this._dialogService.addDialog(GenericFormPopupComponent, { + type: PopupType.VF_MODULE, + uuidData: <any>{ + serviceId: serviceModelId, + modelName: node.data.name, + vFModuleStoreKey: null, + vnfStoreKey: vnfStoreKey, + modelId: node.data.modelId, + type: node.data.type, + popupService: this._vfModulePopupService + }, + node: node, + isUpdateMode: false + }); + } else { + let messageBoxData: MessageBoxData = new MessageBoxData( + "Select a parent", // modal title + "There are multiple instances on the right side that can contain this vf-module Please select the VNF instance, to add this vf-module to, on the right side and then click the + sign", + <any>"warning", + <any>"md", + [ + {text: "Close", size: "medium", closeModal: true} + ]); + MessageBoxService.openModal.next(messageBoxData); + } + } + + getDefaultVNF(node: ITreeNode, serviceModelId: string): string { + let keys = _.keys(_.pickBy(this._store.getState().service.serviceInstance[serviceModelId].vnfs, vnf => { + return (vnf.originalName == node.data.name); + })); + return keys.length === 1 ? this._store.getState().service.serviceInstance[serviceModelId].vnfs[keys[0]].vnfStoreKey : null; + } + + /*********************************************************** + * return number of existing instances (in all VNF's) + * @param node - VfModule node + * @param serviceModelId - current service id + ************************************************************/ + getNodeCount(node: ITreeNode, serviceModelId: string): number { + let count: number = 0; + if (!_.isNil(this._store.getState().service.serviceInstance) && !_.isNil(this._store.getState().service.serviceInstance[serviceModelId])) { + const vnfs = this._store.getState().service.serviceInstance[serviceModelId].vnfs; + + for (let vnfKey in vnfs) { + count += this.countNumberOfVFModule(vnfs[vnfKey], node); + } + return count; + } + return count; + } + + + countNumberOfVFModule(vnf, node): number { + let count = 0; + for (let vfModuleKey in vnf['vfModules']) { + for (let vfModule in vnf['vfModules'][vfModuleKey]) { + if (vnf['vfModules'][vfModuleKey][vfModule]['modelInfo'].modelCustomizationId === node.data.modelUniqueId) { + const vfModuleObj = vnf['vfModules'][vfModuleKey][vfModule]; + if (!(!_.isNil(vfModuleObj) && !_.isNil(vfModuleObj.action) && vfModuleObj.action.split('_').pop() === 'Delete')) count++; + } + } + } + return count; + } + + getCountVFModuleOfSelectedVNF(node: ITreeNode, vnfStoreKey: string, serviceModelId: string): number { + let count: number = 0; + if (!_.isNil(this._store.getState().service.serviceInstance) && !_.isNil(this._store.getState().service.serviceInstance[serviceModelId])) { + const vnfs = this._store.getState().service.serviceInstance[serviceModelId].vnfs; + + for (let vnfKey in vnfs) { + count += this.countNumberOfVFModule(vnfs[vnfKey], node); + } + return count; + } + return count; + } + + + /*********************************************************** + * should show node icon + * @param node - current ITrees node + * @param serviceModelId - service id + ************************************************************/ + showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons { + const selectedVNF: string = this._sharedTreeService.getSelectedVNF(); + if (selectedVNF) { + return this.showVFModuleOnSelectedVNF(node, selectedVNF, serviceModelId); + } else { + const optionalSelected = this.getOptionalVNFs(serviceModelId, node.parent.data.name); + if (optionalSelected.length === 1) { + return this.showVFModuleOnSelectedVNF(node, optionalSelected[0].vnfStoreKey, serviceModelId); + } else { + return new AvailableNodeIcons(false, false); + } + } + } + + + showVFModuleOnSelectedVNF(node: ITreeNode, selectedVNF: string, serviceModelId: string): AvailableNodeIcons { + + if (!_.isNil(this._store.getState().service.serviceInstance[serviceModelId].vnfs[selectedVNF]) && node.parent.data.name === this._store.getState().service.serviceInstance[serviceModelId].vnfs[selectedVNF].originalName) { + const existingVFModules = this.getCountVFModuleOfSelectedVNF(node, selectedVNF, serviceModelId); + const reachedLimit = this.isVFModuleReachedLimit(node, this._store.getState().service.serviceHierarchy, serviceModelId, existingVFModules); + const showAddIcon = this._sharedTreeService.shouldShowAddIcon()&& !reachedLimit; + return new AvailableNodeIcons(showAddIcon, reachedLimit); + } + return new AvailableNodeIcons(false, false); + + } + + getOptionalVNFs(serviceUUID: string, vnfOriginalModelName: string): any[] { + let result = []; + if (!_.isNil(this._store.getState().service.serviceInstance) && !_.isNil(this._store.getState().service.serviceInstance[serviceUUID])) { + const serviceVNFsInstances = this._store.getState().service.serviceInstance[serviceUUID].vnfs; + for (let vnfKey in serviceVNFsInstances) { + if (serviceVNFsInstances[vnfKey].originalName === vnfOriginalModelName) { + serviceVNFsInstances[vnfKey].vnfStoreKey = vnfKey; + result.push(serviceVNFsInstances[vnfKey]); + } + } + } + return result; + } + + + /************************************************ + return number of instances with action Delete + @type: vnfs networks, vngGroups (only vfModule) + @node : node model from the left tree + ************************************************/ + getExistingInstancesWithDeleteMode(node, serviceModelId: string, selectedVNF: string): number { + const existingInstances = this._store.getState().service.serviceInstance[serviceModelId].vnfs[selectedVNF].vfModules; + let counter = 0; + const modelUuid = node.data.uuid; + + if (!_.isNil(existingInstances)) { + for (let instanceKey in existingInstances) { + let size = Object.keys(existingInstances[instanceKey]).length; + for (let i = 0; i < size; i++) { + let vfModuleDynamicKey = Object.keys(existingInstances[instanceKey])[i]; + if (!_.isNil(existingInstances[instanceKey][vfModuleDynamicKey].action)) { + if (existingInstances[instanceKey][vfModuleDynamicKey]['uuid'] === modelUuid && existingInstances[instanceKey][vfModuleDynamicKey].action.split('_').pop() === 'Delete') { + counter++; + } + } + } + + } + } + return counter; + } + + isVFModuleReachedLimit(node: any, serviceHierarchy: any, serviceModelId: string, currentNodeCount: number): boolean { + let maxNodes: number = 1; + let vnfModules = serviceHierarchy[serviceModelId].vfModules; + if (vnfModules[node.data.name]) { + maxNodes = vnfModules[node.data.name].properties.maxCountInstances || 1; + } + return !(maxNodes > currentNodeCount); + + } + + getMenuAction(node: ITreeNode, serviceModelId: string): { [methodName: string]: { method: Function, visible: Function, enable: Function } } { + return { + edit: { + method: (node, serviceModelId) => { + this._iframeService.addClassOpenModal('content'); + this._dialogService.addDialog(GenericFormPopupComponent, { + type: PopupType.VF_MODULE, + uuidData: <any>{ + serviceId: serviceModelId, + modelName: node.data.modelName, + vFModuleStoreKey: node.data.dynamicModelName, + vnfStoreKey: node.parent.data.vnfStoreKey, + modelId: node.data.modelId, + type: node.data.type, + popupService: this._vfModulePopupService + }, + node: node, + isUpdateMode: true + }); + }, + visible: (node) => this._sharedTreeService.shouldShowRemoveAndEdit(node), + enable: (node) => this._sharedTreeService.shouldShowRemoveAndEdit(node), + }, + showAuditInfo: { + method: (node, serviceModelId) => { + let instance = this._store.getState().service.serviceInstance[serviceModelId].vnfs[node.parent.data.vnfStoreKey].vfModules[node.data.modelName][node.data.modelVersionId]; + this._sharedTreeService.openAuditInfoModal(node, serviceModelId, instance, 'VFMODULE', this); + }, + visible: (node) => this._sharedTreeService.shouldShowAuditInfo(node), + enable: (node) => this._sharedTreeService.shouldShowAuditInfo(node) + }, + remove: { + method: (node, serviceModelId) => this._store.dispatch(removeVfModuleInstance(node.data.modelName, serviceModelId, node.parent.data.modelName, node.parent.data.vnfStoreKey, node.data.dynamicModelName)), + visible: (node) => this._sharedTreeService.shouldShowRemoveAndEdit(node), + enable: (node) => this._sharedTreeService.shouldShowRemoveAndEdit(node), + }, + delete: { + method: (node, serviceModelId) => { + this._store.dispatch(deleteActionVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId)) + }, + visible: (node) => this._sharedTreeService.shouldShowDelete(node), + enable: (node) => this._sharedTreeService.shouldShowDelete(node) + }, + undoDelete: { + method: (node, serviceModelId) => { + this._store.dispatch(undoDeleteVfModuleInstance(node.data.dynamicModelName, node.parent.data.vnfStoreKey, serviceModelId)) + }, + visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node), + enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId) + } + }; + + + } + + updatePosition(that , node, instanceId, parentStoreKey): void { + that.store.dispatch(updateVFModulePosition(node, instanceId, parentStoreKey)); + } + + + getNodePosition(instance, deepDynamicName): number { + return (!_.isNil(instance) && !_.isNil(instance[deepDynamicName])) ? instance[deepDynamicName].position : null; + } + + onSelectedNode(node: ITreeNode): void { + } + + getInfoForVFModule(model, instance): ComponentInfoModel { + let modelInfoItems: ModelInformationItem[] = []; + if (model && !_.isNil(model.properties)) + { + modelInfoItems = [ + ModelInformationItem.createInstance("Base Module", model.properties.baseModule), + ModelInformationItem.createInstance("Min Instances", model.properties.minCountInstances), + ModelInformationItem.createInstance("Max Instances", model.properties.maxCountInstances), + ModelInformationItem.createInstance("Initial Instances Count", model.properties.initialCount) + ]; + } + return this._componentInfoService.addGeneralInfoItems(modelInfoItems, ComponentInfoType.VFMODULE, model, instance); + } + + +} |