Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | |
| 2 | import {HttpClientTestingModule, HttpTestingController} from "@angular/common/http/testing"; |
| 3 | import {getTestBed, TestBed} from "@angular/core/testing"; |
| 4 | import {NgRedux} from "@angular-redux/store"; |
| 5 | import {AuditInfoModalComponentService} from "./auditInfoModal.component.service"; |
| 6 | import {ModelInformationItem} from "../model-information/model-information.component"; |
| 7 | |
| 8 | class MockAppStore<T> { |
| 9 | getState() { |
| 10 | return { |
| 11 | "service": { |
| 12 | "serviceInstance": { |
| 13 | "6e59c5de-f052-46fa-aa7e-2fca9d674c44": { |
| 14 | "instanceParams": [], |
| 15 | "bulkSize": 1, |
| 16 | "action": "None", |
| 17 | "instanceName": "PQijmEmzhVma4zujr", |
| 18 | "instanceId": "service-instance-id", |
| 19 | "orchStatus": "GARBAGE DATA", |
| 20 | "productFamilyId": null, |
| 21 | "lcpCloudRegionId": null, |
| 22 | "tenantId": null, |
| 23 | "modelInfo": { |
| 24 | "modelInvariantId": "d27e42cf-087e-4d31-88ac-6c4b7585f800", |
| 25 | "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44", |
| 26 | "modelName": "vf_vEPDG", |
| 27 | "modelType": "service", |
| 28 | "modelVersion": "5.0" |
| 29 | }, |
| 30 | "globalSubscriberId": "global-customer-id", |
| 31 | "subscriptionServiceType": "service-instance-type", |
| 32 | "owningEntityId": null, |
| 33 | "owningEntityName": null, |
| 34 | "tenantName": null, |
| 35 | "aicZoneId": null, |
| 36 | "aicZoneName": null, |
| 37 | "projectName": null, |
| 38 | "rollbackOnFailure": null, |
| 39 | "isALaCarte": false |
| 40 | } |
| 41 | }, |
| 42 | "subscribers": [ |
| 43 | { |
| 44 | "id": "CAR_2020_ER", |
| 45 | "name": "CAR_2020_ER", |
| 46 | "isPermitted": true |
| 47 | }, |
| 48 | { |
| 49 | "id": "21014aa2-526b-11e6-beb8-9e71128cae77", |
| 50 | "name": "JULIO ERICKSON", |
| 51 | "isPermitted": false |
| 52 | }, |
| 53 | { |
| 54 | "id": "global-customer-id", |
| 55 | "name": "DALE BRIDGES", |
| 56 | "isPermitted": false |
| 57 | }, |
| 58 | { |
| 59 | "id": "DHV1707-TestSubscriber-1", |
| 60 | "name": "LLOYD BRIDGES", |
| 61 | "isPermitted": false |
| 62 | }, |
| 63 | { |
| 64 | "id": "jimmy-example", |
| 65 | "name": "JimmyExampleCust-20161102", |
| 66 | "isPermitted": false |
| 67 | }, |
| 68 | { |
| 69 | "id": "jimmy-example2", |
| 70 | "name": "JimmyExampleCust-20161103", |
| 71 | "isPermitted": false |
| 72 | }, |
| 73 | { |
| 74 | "id": "ERICA5779-TestSub-PWT-102", |
| 75 | "name": "ERICA5779-TestSub-PWT-102", |
| 76 | "isPermitted": false |
| 77 | }, |
| 78 | { |
| 79 | "id": "ERICA5779-TestSub-PWT-101", |
| 80 | "name": "ERICA5779-TestSub-PWT-101", |
| 81 | "isPermitted": false |
| 82 | }, |
| 83 | { |
| 84 | "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", |
| 85 | "name": "Emanuel", |
| 86 | "isPermitted": false |
| 87 | }, |
| 88 | { |
| 89 | "id": "ERICA5779-Subscriber-4", |
| 90 | "name": "ERICA5779-Subscriber-5", |
| 91 | "isPermitted": false |
| 92 | }, |
| 93 | { |
| 94 | "id": "ERICA5779-TestSub-PWT-103", |
| 95 | "name": "ERICA5779-TestSub-PWT-103", |
| 96 | "isPermitted": false |
| 97 | }, |
| 98 | { |
| 99 | "id": "ERICA5779-Subscriber-2", |
| 100 | "name": "ERICA5779-Subscriber-2", |
| 101 | "isPermitted": false |
| 102 | }, |
| 103 | { |
| 104 | "id": "e433710f-9217-458d-a79d-1c7aff376d89", |
| 105 | "name": "SILVIA ROBBINS", |
| 106 | "isPermitted": true |
| 107 | }, |
| 108 | { |
| 109 | "id": "ERICA5779-Subscriber-3", |
| 110 | "name": "ERICA5779-Subscriber-3", |
| 111 | "isPermitted": false |
| 112 | }, |
| 113 | { |
| 114 | "id": "31739f3e-526b-11e6-beb8-9e71128cae77", |
| 115 | "name": "CRAIG/ROBERTS", |
| 116 | "isPermitted": false |
| 117 | } |
| 118 | ] |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | describe("Audit info modal component service", () => { |
| 125 | let injector; |
| 126 | let httpMock: HttpTestingController; |
| 127 | let auditInfoModalComponentService: AuditInfoModalComponentService; |
| 128 | |
| 129 | |
| 130 | beforeAll(done => (async () => { |
| 131 | TestBed.configureTestingModule({ |
| 132 | imports: [HttpClientTestingModule], |
| 133 | providers: [ |
| 134 | AuditInfoModalComponentService, |
| 135 | {provide: NgRedux, useClass: MockAppStore} |
| 136 | ] |
| 137 | }); |
| 138 | await TestBed.compileComponents(); |
| 139 | |
| 140 | injector = getTestBed(); |
| 141 | httpMock = injector.get(HttpTestingController); |
| 142 | auditInfoModalComponentService = injector.get(AuditInfoModalComponentService); |
| 143 | |
| 144 | })().then(done).catch(done.fail)); |
| 145 | |
| 146 | |
| 147 | test('auditInfoModalComponentService service should be defined', () => { |
| 148 | expect(auditInfoModalComponentService).toBeDefined(); |
| 149 | }); |
| 150 | |
| 151 | test('getModelInfo: VNF information from existing instance with model', () => { |
| 152 | const model = getVNFModel(); |
| 153 | const instance = getVNFInstance(); |
| 154 | const results: ModelInformationItem[] = auditInfoModalComponentService.getModelInfo(model, instance, "6e59c5de-f052-46fa-aa7e-2fca9d674c44"); |
| 155 | expect(results.find((item) => item.label === 'Model customization ID').values[0]).toEqual("91415b44-753d-494c-926a-456a9172bbb9"); |
| 156 | expect(results.find((item) => item.label === 'Model version').values[0]).toEqual("2.0"); |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 157 | expect(results.find((item) => item.label === 'Model name').values[0]).toEqual("VF_vGeraldine"); |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 158 | expect(results.find((item) => item.label === 'Instance name').values[0]).toEqual("4O61SmpFAdCm1oVEs"); |
| 159 | expect(results.find((item) => item.label === 'Instance ID').values[0]).toEqual("66cbb3b5-c823-470c-9520-4e0b85112250"); |
| 160 | expect(results.find((item) => item.label === 'Subscriber name').values[0]).toEqual("DALE BRIDGES"); // TODO should call subscriber |
| 161 | expect(results.find((item) => item.label === 'Service type').values[0]).toEqual("service-instance-type"); |
| 162 | }); |
| 163 | |
| 164 | test('getModelInfo: Network information from existing instance without model', () => { |
| 165 | const model = getNetworkModel(); |
| 166 | const instance = getNetworkInstance(); |
| 167 | const results: ModelInformationItem[] = auditInfoModalComponentService.getModelInfo(model, instance, "6e59c5de-f052-46fa-aa7e-2fca9d674c44"); |
| 168 | expect(results.find((item) => item.label === 'Instance name').values[0]).toEqual("KADmyK6e3sVWNfGbA"); |
| 169 | expect(results.find((item) => item.label === 'Instance ID').values[0]).toEqual("712cad2d-fc1c-40c7-aaff-d2d6e17ac2b6"); |
| 170 | expect(results.find((item) => item.label === 'Subscriber name').values[0]).toEqual("DALE BRIDGES"); // TODO should call subscriber |
| 171 | expect(results.find((item) => item.label === 'Service type').values[0]).toEqual("service-instance-type"); |
| 172 | }); |
| 173 | |
| 174 | test('getModelInfo: VFModule information from existing instance with model', () => { |
| 175 | const model = getVFModule(); |
| 176 | const instance = getVFModuleInstance(); |
| 177 | const results: ModelInformationItem[] = auditInfoModalComponentService.getModelInfo(model, instance, "6e59c5de-f052-46fa-aa7e-2fca9d674c44"); |
| 178 | expect(results.find((item) => item.label === 'Model customization ID').values[0]).toEqual("55b1be94-671a-403e-a26c-667e9c47d091"); |
| 179 | expect(results.find((item) => item.label === 'Model version').values[0]).toEqual("2"); |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 180 | expect(results.find((item) => item.label === 'Model name').values[0]).toEqual("VfVgeraldine..vflorence_vlc..module-1"); |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 181 | expect(results.find((item) => item.label === 'Instance name').values[0]).toEqual("ss820f_0918_db"); |
| 182 | expect(results.find((item) => item.label === 'Instance ID').values[0]).toEqual("2c1ca484-cbc2-408b-ab86-25a2c15ce280"); |
| 183 | expect(results.find((item) => item.label === 'Subscriber name').values[0]).toEqual("DALE BRIDGES"); // TODO should call subscriber |
| 184 | expect(results.find((item) => item.label === 'Service type').values[0]).toEqual("service-instance-type"); |
| 185 | }); |
| 186 | |
| 187 | test('getModelInfo: VNFGroup information from existing instance with model', () => { |
| 188 | const model = getVNFGroupModel(); |
| 189 | const instance = getVNFGroupInstance(); |
| 190 | const results: ModelInformationItem[] = auditInfoModalComponentService.getModelInfo(model, instance, "6e59c5de-f052-46fa-aa7e-2fca9d674c44"); |
| 191 | expect(results.find((item) => item.label === 'Model version').values[0]).toEqual("1"); |
| 192 | expect(results.find((item) => item.label === 'Model name').values[0]).toEqual("groupingservicefortest..ResourceInstanceGroup..0"); |
| 193 | expect(results.find((item) => item.label === 'Instance name').values[0]).toEqual("VNF_GROUP1_INSTANCE_NAME"); |
| 194 | expect(results.find((item) => item.label === 'Instance ID').values[0]).toEqual("VNF_GROUP1_INSTANCE_ID"); |
| 195 | expect(results.find((item) => item.label === 'Subscriber name').values[0]).toEqual("DALE BRIDGES"); // TODO should call subscriber |
| 196 | expect(results.find((item) => item.label === 'Service type').values[0]).toEqual("service-instance-type"); |
| 197 | }); |
| 198 | |
| 199 | |
| 200 | test('setModalTitlesType: should return modal title', () => { |
| 201 | expect(AuditInfoModalComponentService.setModalTitle('VNF')).toEqual('VNF Instantiation Information'); |
| 202 | expect(AuditInfoModalComponentService.setModalTitle('VFMODULE')).toEqual('VfModule Instantiation Information'); |
| 203 | expect(AuditInfoModalComponentService.setModalTitle('NETWORK')).toEqual('Network Instantiation Information'); |
| 204 | expect(AuditInfoModalComponentService.setModalTitle('VNFGROUP')).toEqual('Vnf Group Instantiation Information'); |
| 205 | }); |
| 206 | |
| 207 | test('setModalTitlesType: should return modal title type', () => { |
| 208 | expect(AuditInfoModalComponentService.setModalTitlesType('VNF')).toEqual('VNF'); |
| 209 | expect(AuditInfoModalComponentService.setModalTitlesType('VFMODULE')).toEqual('VfModule'); |
| 210 | expect(AuditInfoModalComponentService.setModalTitlesType('NETWORK')).toEqual('Network'); |
| 211 | expect(AuditInfoModalComponentService.setModalTitlesType('VNFGROUP')).toEqual('Vnf Group'); |
| 212 | }); |
| 213 | |
| 214 | test('getInstanceModelName: should return model name if exist', () => { |
| 215 | expect(AuditInfoModalComponentService.getInstanceModelName({name : 'some name'})).toEqual('some name'); |
| 216 | expect(AuditInfoModalComponentService.getInstanceModelName(null)).toEqual(''); |
| 217 | }); |
| 218 | |
| 219 | test('createModelInformationItemsJob: should return job information', () => { |
| 220 | let service = { |
| 221 | "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44", |
| 222 | "invariantUuid": "cfef8302-d90f-475f-87cc-3f49a62ef14c", |
| 223 | "name": "ComplexService", |
| 224 | "version": "1.0", |
| 225 | "toscaModelURL": null, |
| 226 | "category": "Emanuel", |
| 227 | "serviceType": "", |
| 228 | "serviceRole": "", |
| 229 | "description": "ComplexService", |
| 230 | "serviceEcompNaming": "true", |
| 231 | "instantiationType": "Macro", |
| 232 | "inputs": {}, |
| 233 | "vidNotions": { |
| 234 | "instantiationUI": "legacy", |
| 235 | "modelCategory": "other", |
| 236 | "viewEditUI": "legacy" |
| 237 | } |
| 238 | }; |
| 239 | const results = AuditInfoModalComponentService.createModelInformationItemsJob(<any>service); |
| 240 | }); |
| 241 | |
| 242 | |
| 243 | function getVNFModel(){ |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 244 | return {"name":"VF_vGeraldine","version":"2.0","description":"VSP_vGeraldine","uuid":"d6557200-ecf2-4641-8094-5393ae3aae60","invariantUuid":"4160458e-f648-4b30-a176-43881ffffe9e","max":1,"min":0,"customizationUuid":"91415b44-753d-494c-926a-456a9172bbb9","isEcompGeneratedNaming":true,"type":"VF","modelCustomizationName":"VF_vGeraldine 0","vfcInstanceGroups":{},"properties":{"gpb2_Internal2_mac":"00:11:22:EF:AC:DF","sctp-a-ipv6-egress_rule_application":"any","sctp-b-ipv6-egress_src_start_port":"0","Internal2_allow_transit":"true","sctp-b-IPv6_ethertype":"IPv6","ncb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ingress_rule_protocol":"icmp","sctp-b-ingress_action":"pass","sctp-a-egress_rule_application":"any","sctp-b-ipv6-ingress-src_start_port":"0.0","ncb1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-b-egress_src_addresses":"local","fsb_volume_size_0":"320.0","sctp-a-ipv6-ingress-dst_start_port":"0","sctp-a-ipv6-ingress_ethertype":"IPv4","sctp-b-ipv6-ingress_rule_application":"any","domain_name":"default-domain","sctp-a-egress_src_addresses":"local","sctp-b-egress-src_start_port":"0.0","sctp-a-ingress_rule_protocol":"icmp","sctp-b-display_name":"epc-sctp-b-ipv4v6-sec-group","sctp-b-ipv6-ingress-dst_end_port":"65535","sctp-a-ingress_ethertype":"IPv4","sctp-a-egress-src_start_port":"0.0","sctp-b-dst_subnet_prefix_v6":"::","nf_naming":"{ecomp_generated_naming=true}","sctp-a-ipv6-ingress_src_subnet_prefix":"0.0.0.0","sctp-b-egress-dst_start_port":"0.0","ncb_flavor_name":"nv.c20r64d1","sctp-b-egress_dst_subnet_prefix_len":"0.0","gpb1_Internal1_mac":"00:11:22:EF:AC:DF","Internal2_net_cidr":"10.0.0.10","sctp-a-ingress-dst_start_port":"0.0","fsb1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-a-egress-dst_start_port":"0.0","sctp-a-egress_ethertype":"IPv4","vlc_st_service_mode":"in-network-nat","sctp-a-ipv6-egress_ethertype":"IPv4","sctp-a-egress-src_end_port":"65535.0","sctp-b-egress_action":"pass","sctp-b-ipv6-egress_rule_application":"any","sctp-a-ingress-src_subnet_prefix_len":"0.0","sctp-b-ipv6-ingress-src_end_port":"65535.0","sctp-a-ipv6-ingress-src_start_port":"0.0","fsb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-name":"epc-sctp-b-ipv4v6-sec-group","sctp-b-ipv6-egress_ethertype":"IPv4","Internal1_net_cidr":"10.0.0.10","sctp-a-egress_dst_subnet_prefix":"0.0.0.0","fsb_flavor_name":"nv.c20r64d1","sctp_rule_protocol":"132","sctp-a-ipv6-ingress_rule_application":"any","sctp-b-ipv6-ingress_src_subnet_prefix_len":"0","ecomp_generated_naming":"true","sctp-a-IPv6_ethertype":"IPv6","vlc_st_virtualization_type":"virtual-machine","vlc2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ingress-dst_end_port":"65535.0","sctp-b-ingress-dst_start_port":"0.0","sctp-a-ipv6-ingress-src_end_port":"65535.0","sctp-a-display_name":"epc-sctp-a-ipv4v6-sec-group","sctp-b-ingress_rule_application":"any","vlc_flavor_name":"nd.c16r64d1","int2_sec_group_name":"int2-sec-group","sctp-b-ipv6-egress_src_addresses":"local","vlc_st_interface_type_int1":"other1","vlc_st_interface_type_int2":"other2","sctp-a-ipv6-egress-dst_start_port":"0","sctp-b-egress-src_end_port":"65535.0","sctp-a-ipv6-egress_dst_subnet_prefix_len":"0","Internal2_shared":"false","sctp-a-ipv6-egress_rule_protocol":"any","Internal2_rpf":"disable","vlc1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ipv6-egress_src_end_port":"65535","sctp-a-ipv6-egress_src_addresses":"local","sctp-a-ingress-dst_end_port":"65535.0","sctp-a-ipv6-egress_src_end_port":"65535","Internal1_forwarding_mode":"l2","Internal2_dhcp":"false","sctp-a-dst_subnet_prefix_v6":"::","pxe_image_name":"MME_PXE-Boot_16ACP04_GA.qcow2","vlc_st_interface_type_gtp":"other0","ncb1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-src_subnet_prefix_v6":"::","sctp-a-egress_dst_subnet_prefix_len":"0.0","int1_sec_group_name":"int1-sec-group","Internal1_dhcp":"false","fsb2_Internal2_mac":"00:11:22:EF:AC:DF","Internal2_forwarding_mode":"l2","sctp-a-ipv6-egress_dst_end_port":"65535","sctp-b-egress_dst_subnet_prefix":"0.0.0.0","Internal1_net_cidr_len":"17","gpb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-a-ingress_dst_addresses":"local","sctp-b-ingress-src_subnet_prefix_len":"0.0","sctp-a-egress_action":"pass","fsb_volume_type_0":"SF-Default-SSD","ncb2_Internal2_mac":"00:11:22:EF:AC:DF","vlc_st_interface_type_sctp_a":"left","vlc_st_version":"2","sctp-a-src_subnet_prefix_v6":"::","vlc_st_interface_type_sctp_b":"right","sctp-a-ingress_rule_application":"any","sctp-b-egress_ethertype":"IPv4","sctp-a-ipv6-egress_src_start_port":"0","instance_ip_family_v6":"v6","gpb1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-b-ingress-src_start_port":"0.0","fsb1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ingress_dst_addresses":"local","vlc_st_interface_type_oam":"management","multi_stage_design":"false","oam_sec_group_name":"oam-sec-group","Internal2_net_gateway":"10.0.0.10","sctp-a-ipv6-ingress-dst_end_port":"65535","Internal1_net_gateway":"10.0.0.10","sctp-b-ipv6-egress-dst_start_port":"0","sctp-b-ipv6-egress_rule_protocol":"any","gtp_sec_group_name":"gtp-sec-group","sctp-a-ipv6-egress_dst_subnet_prefix":"0.0.0.0","sctp-a-ipv6-ingress_dst_addresses":"local","sctp-b-ipv6-egress_dst_subnet_prefix_len":"0","sctp-b-ipv6-egress_action":"pass","sctp-a-egress_rule_protocol":"icmp","sctp-a-ipv6-egress_action":"pass","Internal1_shared":"false","sctp-b-ipv6-ingress_rule_protocol":"any","Internal2_net_cidr_len":"17","sctp-a-name":"epc-sctp-a-ipv4v6-sec-group","sctp-a-ingress-src_end_port":"65535.0","sctp-b-ipv6-ingress_src_subnet_prefix":"0.0.0.0","sctp-a-egress-dst_end_port":"65535.0","sctp-b-egress_rule_protocol":"icmp","sctp-a-ingress_action":"pass","sctp-b-ipv6-ingress_action":"pass","vlc_st_service_type":"firewall","sctp-b-ipv6-egress_dst_end_port":"65535","vlc2_Internal2_mac":"00:11:22:EF:AC:DF","sctp-b-ipv6-ingress-dst_start_port":"0","vlc_st_availability_zone":"true","sctp-b-ingress-src_subnet_prefix":"0.0.0.0","fsb_volume_image_name_1":"MME_FSB2_16ACP04_GA.qcow2","sctp-a-ipv6-ingress_src_subnet_prefix_len":"0","gpb_flavor_name":"nv.c20r64d1","Internal1_allow_transit":"true","availability_zone_max_count":"1","fsb_volume_image_name_0":"MME_FSB1_16ACP04_GA.qcow2","sctp-b-ipv6-ingress_dst_addresses":"local","sctp-b-ipv6-ingress_ethertype":"IPv4","sctp-b-ipv6-egress_dst_subnet_prefix":"0.0.0.0","sctp-a-ingress-src_subnet_prefix":"0.0.0.0","vlc1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-a-ipv6-ingress_action":"pass","Internal1_rpf":"disable","sctp-b-ingress_ethertype":"IPv4","sctp-b-ingress-src_end_port":"65535.0","sctp-b-egress_rule_application":"any","sctp-a-ipv6-ingress_rule_protocol":"any","sctp-a-ingress-src_start_port":"0.0","sctp-b-egress-dst_end_port":"65535.0"}}; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | function getVNFInstance(){ |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 248 | return {"action":"None","instanceName":"4O61SmpFAdCm1oVEs","instanceId":"66cbb3b5-c823-470c-9520-4e0b85112250","orchStatus":null,"productFamilyId":null,"lcpCloudRegionId":null,"tenantId":null,"modelInfo":{"modelCustomizationName":"VF_vGeraldine 0","modelInvariantId":"vnf-instance-model-invariant-id","modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60","modelType":"vnf"},"instanceType":"7538ifdSoTccmbEkr","provStatus":null,"inMaint":true,"uuid":"d6557200-ecf2-4641-8094-5393ae3aae60","originalName":"VF_vGeraldine 0","legacyRegion":null,"lineOfBusiness":null,"platformName":null,"trackById":"VF_vGeraldine 0:004","vfModules":{"vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1":{"vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1:008":{"action":"None","instanceName":"ss820f_0918_db","instanceId":"2c1ca484-cbc2-408b-ab86-25a2c15ce280","orchStatus":"deleted","productFamilyId":null,"lcpCloudRegionId":null,"tenantId":null,"modelInfo":{"modelCustomizationName":"VfVgeraldine..vflorence_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":"VfVgeraldine..vflorence_vlc..module-1","legacyRegion":null,"lineOfBusiness":null,"platformName":null,"trackById":"vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1:008","isBase":false,"volumeGroupName":null}},"dc229cd8-c132-4455-8517-5c1787c18b14":{"dc229cd8-c132-4455-8517-5c1787c18b14:009":{"action":"None","instanceName":"ss820f_0918_base","instanceId":"3ef042c4-259f-45e0-9aba-0989bd8d1cc5","orchStatus":"Assigned","productFamilyId":null,"lcpCloudRegionId":null,"tenantId":null,"modelInfo":{"modelCustomizationId":"8ad8670b-0541-4499-8101-275bbd0e8b6a","modelInvariantId":"1e463c9c-404d-4056-ba56-28fd102608de","modelVersionId":"dc229cd8-c132-4455-8517-5c1787c18b14","modelType":"vfModule"},"instanceType":null,"provStatus":null,"inMaint":false,"uuid":"dc229cd8-c132-4455-8517-5c1787c18b14","originalName":null,"legacyRegion":null,"lineOfBusiness":null,"platformName":null,"trackById":"dc229cd8-c132-4455-8517-5c1787c18b14:009","isBase":true,"volumeGroupName":null}}},"networks":{}}; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | function getVFModule(){ |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 252 | return {"uuid":"522159d5-d6e0-4c2a-aa44-5a542a12a830","invariantUuid":"98a7c88b-b577-476a-90e4-e25a5871e02b","customizationUuid":"55b1be94-671a-403e-a26c-667e9c47d091","description":null,"name":"VfVgeraldine..vflorence_vlc..module-1","version":"2","modelCustomizationName":"VfVgeraldine..vflorence_vlc..module-1","properties":{"minCountInstances":0,"maxCountInstances":null,"initialCount":0,"vfModuleLabel":"vflorence_vlc","baseModule":false},"inputs":{},"volumeGroupAllowed":false}; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | function getVFModuleInstance() { |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 256 | return{"action":"None","instanceName":"ss820f_0918_db","instanceId":"2c1ca484-cbc2-408b-ab86-25a2c15ce280","orchStatus":"deleted","productFamilyId":null,"lcpCloudRegionId":null,"tenantId":null,"modelInfo":{"modelCustomizationName":"VfVgeraldine..vflorence_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":"VfVgeraldine..vflorence_vlc..module-1","legacyRegion":null,"lineOfBusiness":null,"platformName":null,"trackById":"vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1:008","isBase":false,"volumeGroupName":null}; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 257 | } |
| 258 | |
| 259 | function getNetworkModel(){ |
| 260 | return null; |
| 261 | } |
| 262 | |
| 263 | function getNetworkInstance(){ |
| 264 | return {"action":"None","instanceName":"KADmyK6e3sVWNfGbA","instanceId":"712cad2d-fc1c-40c7-aaff-d2d6e17ac2b6","orchStatus":"Assigned","productFamilyId":null,"lcpCloudRegionId":null,"tenantId":null,"modelInfo":{"modelInvariantId":"network-instance-model-invariant-id","modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986","modelType":"network"},"instanceType":"CONTRAIL30_BASIC","provStatus":"nvtprov","inMaint":false,"uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986","originalName":null,"legacyRegion":null,"lineOfBusiness":null,"platformName":null,"trackById":"ddc3f20c-08b5-40fd-af72-c6d14636b986:001"}; |
| 265 | } |
| 266 | |
| 267 | function getVNFGroupModel(){ |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 268 | return {"name":"groupingservicefortest..ResourceInstanceGroup..0","version":"1","uuid":"daeb6568-cef8-417f-9075-ed259ce59f48","invariantUuid":"4bb2e27e-ddab-4790-9c6d-1f731bc14a45","max":1,"min":0,"isEcompGeneratedNaming":true,"type":"VnfGroup","modelCustomizationName":"groupingservicefortest..ResourceInstanceGroup..0","properties":{"contained_resource_type":"VF","role":"SERVICE-ACCESS","function":"DATA","description":"DDD0","type":"LOAD-GROUP","ecomp_generated_naming":"true"},"members":{"vdorothea_svc_vprs_proxy 0":{"uuid":"65fadfa8-a0d9-443f-95ad-836cd044e26c","invariantUuid":"f4baae0c-b3a5-4ca1-a777-afbffe7010bc","description":"A Proxy for Service vDOROTHEA_Svc_vPRS","name":"vDOROTHEA_Svc_vPRS Service Proxy","version":"1.0","customizationUuid":"bdb63d23-e132-4ce7-af2c-a493b4cafac9","inputs":{},"commands":{},"properties":{"ecomp_generated_naming":"false"},"type":"Service Proxy","sourceModelUuid":"da7827a2-366d-4be6-8c68-a69153c61274","sourceModelInvariant":"24632e6b-584b-4f45-80d4-fefd75fd9f14","sourceModelName":"vDOROTHEA_Svc_vPRS"}}}; |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | function getVNFGroupInstance(){ |
| 272 | return {"originalName":"groupingservicefortest..ResourceInstanceGroup..0","trackById":"groupingservicefortest..ResourceInstanceGroup..0:001","instanceName":"VNF_GROUP1_INSTANCE_NAME","action":"None","instanceId":"VNF_GROUP1_INSTANCE_ID","instanceType":"VNF_GROUP1_INSTANCE_TYPE","orchStatus":"Active","provStatus":null,"inMaint":false,"modelInfo":{"modelType":"instanceGroup","modelCustomizationName":"groupingservicefortest..ResourceInstanceGroup..0","modelInvariantId":"4bb2e27e-ddab-4790-9c6d-1f731bc14a45","modelVersionId":"daeb6568-cef8-417f-9075-ed259ce59f48"},"uuid":"daeb6568-cef8-417f-9075-ed259ce59f48","vnfs":{}}; |
| 273 | } |
| 274 | }); |