diff options
author | Amichai Hemli <ah0398@intl.att.com> | 2019-07-09 14:23:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-09 14:23:37 +0000 |
commit | 58d22b526418ffeb89337fed9e20406da420bc6f (patch) | |
tree | 4357c9cfe1c92d57ac0a3f90167cade7af505b95 /vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts | |
parent | 302b02a847e7aa8ccf3ff4bc14ff8a9cf67511b0 (diff) | |
parent | 97d9f66df456ef4573047a90baa3cc3ee4bfb0b7 (diff) |
Merge changes Ib4430bf2,Icc0bdb9e,I2736b984
* changes:
Merge from ecomp 718fd196 - Ext. Services Simulator
Merge from ecomp 718fd196 - Integration Tests
Merge from ecomp 718fd196 - Modern UI
Diffstat (limited to 'vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts | 272 |
1 files changed, 16 insertions, 256 deletions
diff --git a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts index 1b102e623..4e7e4dad8 100644 --- a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts +++ b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts @@ -41,7 +41,8 @@ import {updateModel, createServiceInstance} from "../../storeUtil/utils/service/ import {FeatureFlagsService, Features} from "../featureFlag/feature-flags.service"; import {VnfMember} from "../../models/VnfMember"; import {setOptionalMembersVnfGroupInstance} from "../../storeUtil/utils/vnfGroup/vnfGroup.actions"; -import {Observable} from "rxjs"; +import {Observable} from "rxjs";import {NetworkModalRow} from "../../../drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.model"; +import {VPNModalRow} from "../../../drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/vpnStep/vpn.step.model"; @Injectable() export class AaiService { @@ -217,7 +218,7 @@ export class AaiService { }; public static formatCloudOwnerTrailer(cloudOwner: string):string { - return " ("+ cloudOwner.trim().toLowerCase().replace(/^att-/, "").toUpperCase() + ")"; + return " ("+ cloudOwner.trim().toLowerCase().replace(/^[^-]*-/, "").toUpperCase() + ")"; } getServiceTypes = (subscriberId): Observable<ServiceType[]> => { @@ -235,7 +236,7 @@ export class AaiService { }; getSubscriberDetails = (subscriberId): Observable<GetSubDetailsResponse> => { - let pathQuery: string = Constants.Path.AAI_SUB_DETAILS_PATH + subscriberId + Constants.Path.ASSIGN + Math.random(); + let pathQuery: string = Constants.Path.AAI_SUB_DETAILS_PATH + subscriberId + Constants.Path.ASSIGN + Math.random() + Constants.Path.AAI_OMIT_SERVICE_INSTANCES + true; if (subscriberId != null) { return this.http.get<GetSubDetailsResponse>(pathQuery); @@ -257,6 +258,16 @@ export class AaiService { return this.http.get<ServiceInstance>(pathQuery); } + public retrieveActiveNetwork(cloudRegion : string, tenantId: string) : Observable<NetworkModalRow[]>{ + let pathQuery: string = `${Constants.Path.AAI_GET_ACTIVE_NETWORKS_PATH}?cloudRegion=${cloudRegion}&tenantId=${tenantId}`; + return this.http.get<NetworkModalRow[]>(pathQuery); + } + + public retrieveActiveVPNs() : Observable<VPNModalRow[]>{ + let pathQuery: string = `${Constants.Path.AAI_GET_VPNS_PATH}`; + return this.http.get<VPNModalRow[]>(pathQuery); + } + public retrieveAndStoreServiceInstanceTopology(serviceInstanceId: string, subscriberId: string, serviceType: string, serviceModeId: string):Observable<ServiceInstance> { return this.retrieveServiceInstanceTopology(serviceInstanceId, subscriberId, serviceType).do((service:ServiceInstance) => { this.store.dispatch(createServiceInstance(service, serviceModeId)); @@ -268,257 +279,6 @@ export class AaiService { let pathQuery: string = `${Constants.Path.SERVICES_RETRY_TOPOLOGY}/${jobId}`; return this.http.get<ServiceInstance>(pathQuery); - // return of( - // <any>{ - // "action": "None", - // "instanceName": "LXzQMx9clZl7D6ckJ", - // "instanceId": "service-instance-id", - // "orchStatus": "GARBAGE DATA", - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelInvariantId": "d27e42cf-087e-4d31-88ac-6c4b7585f800", - // "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44", - // "modelName": "vf_vEPDG", - // "modelType": "service", - // "modelVersion": "5.0" - // }, - // "globalSubscriberId": "global-customer-id", - // "subscriptionServiceType": "service-instance-type", - // "owningEntityId": null, - // "owningEntityName": null, - // "tenantName": null, - // "aicZoneId": null, - // "aicZoneName": null, - // "projectName": null, - // "rollbackOnFailure": null, - // "isALaCarte": false, - // "vnfs": { - // "1e918ade-3dc6-4cec-b952-3ff94ed82d1c": { - // "action": "None", - // "instanceName": "DgZuxjJy5LMIc3755", - // "instanceId": "1e918ade-3dc6-4cec-b952-3ff94ed82d1c", - // "orchStatus": null, - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelInvariantId": "vnf-instance-model-invariant-id", - // "modelVersionId": "vnf-instance-model-version-id", - // "modelType": "vnf" - // }, - // "instanceType": "SXDBMhwdR9iO0g1Uv", - // "provStatus": null, - // "inMaint": false, - // "uuid": "vnf-instance-model-version-id", - // "originalName": null, - // "legacyRegion": null, - // "lineOfBusiness": null, - // "platformName": null, - // "trackById": "1e918ade-3dc6-4cec-b952-3ff94ed82d1c", - // "vfModules": {}, - // "networks": { - // "ff464c97-ea9c-4165-996a-fe400499af3e": { - // "action": "None", - // "instanceName": "ZI0quzIpu8TNXS7nl", - // "instanceId": "ff464c97-ea9c-4165-996a-fe400499af3e", - // "orchStatus": "Assigned", - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelInvariantId": "network-instance-model-invariant-id", - // "modelVersionId": "network-instance-model-version-id", - // "modelType": "network" - // }, - // "instanceType": "CONTRAIL30_BASIC", - // "provStatus": "prov", - // "inMaint": false, - // "uuid": "network-instance-model-version-id", - // "originalName": null, - // "legacyRegion": null, - // "lineOfBusiness": null, - // "platformName": null, - // "trackById": "ff464c97-ea9c-4165-996a-fe400499af3e", - // "isFailed": true - // }, - // "3e41d57c-8bb4-443e-af02-9f86487ba938": { - // "action": "None", - // "instanceName": "0i9asscqSLm7Poeb8", - // "instanceId": "3e41d57c-8bb4-443e-af02-9f86487ba938", - // "orchStatus": "Created", - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelInvariantId": "network-instance-model-invariant-id", - // "modelVersionId": "network-instance-model-version-id", - // "modelType": "network" - // }, - // "instanceType": "CONTRAIL30_BASIC", - // "provStatus": "prov", - // "inMaint": false, - // "uuid": "network-instance-model-version-id", - // "originalName": null, - // "legacyRegion": null, - // "lineOfBusiness": null, - // "platformName": null, - // "trackById": "3e41d57c-8bb4-443e-af02-9f86487ba938", - // "isFailed": true - // } - // }, - // "isFailed": true - // }, - // "9a9b2705-c569-4f1b-9a67-13e9f86e6c55": { - // "isFailed": true, - // "action": "None", - // "instanceName": "TFn0SYhrCUs7L3qWS", - // "instanceId": "9a9b2705-c569-4f1b-9a67-13e9f86e6c55", - // "orchStatus": null, - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelCustomizationName": "VF_vMee 0", - // "modelInvariantId": "vnf-instance-model-invariant-id", - // "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60", - // "modelType": "vnf" - // }, - // "instanceType": "WIT68GUnH34VaGZgp", - // "provStatus": null, - // "inMaint": true, - // "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60", - // "originalName": "VF_vMee 0", - // "legacyRegion": null, - // "lineOfBusiness": null, - // "platformName": null, - // "trackById": "9a9b2705-c569-4f1b-9a67-13e9f86e6c55", - // "vfModules": { - // "vf_vmee0..VfVmee..vmme_vlc..module-1": { - // "2c1ca484-cbc2-408b-ab86-25a2c15ce280": { - // "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": "2c1ca484-cbc2-408b-ab86-25a2c15ce280", - // "isBase": false, - // "volumeGroupName": null, - // "isFailed": true - // } - // }, - // "dc229cd8-c132-4455-8517-5c1787c18b14": { - // "3ef042c4-259f-45e0-9aba-0989bd8d1cc5": { - // "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": "3ef042c4-259f-45e0-9aba-0989bd8d1cc5", - // "isBase": true, - // "volumeGroupName": null - // } - // } - // }, - // "networks": {} - // } - // }, - // "networks": { - // "e1edb09e-e68b-4ebf-adb8-e2587be56257": { - // "action": "None", - // "instanceName": "cNpGlYQDsmrUDK5iG", - // "instanceId": "e1edb09e-e68b-4ebf-adb8-e2587be56257", - // "orchStatus": "Created", - // "productFamilyId": null, - // "lcpCloudRegionId": null, - // "tenantId": null, - // "modelInfo": { - // "modelInvariantId": "network-instance-model-invariant-id", - // "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986", - // "modelType": "network" - // }, - // "instanceType": "CONTRAIL30_HIMELGUARD", - // "provStatus": "preprov", - // "inMaint": false, - // "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986", - // "originalName": null, - // "legacyRegion": null, - // "lineOfBusiness": null, - // "platformName": null, - // "trackById": "e1edb09e-e68b-4ebf-adb8-e2587be56257" - // }, - // "de4b5203-ad1c-4f2b-8843-5236fb8dc9ba": { - // "action": "None", - // "instanceName": "EI9QlSRVK0lon54Cb", - // "instanceId": "de4b5203-ad1c-4f2b-8843-5236fb8dc9ba", - // "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": "de4b5203-ad1c-4f2b-8843-5236fb8dc9ba", - // "isFailed": true - // } - // }, - // "vnfGroups": {}, - // "validationCounter": 0, - // "existingVNFCounterMap": { - // "vnf-instance-model-version-id": 1, - // "d6557200-ecf2-4641-8094-5393ae3aae60": 1 - // }, - // "existingNetworksCounterMap": { - // "ddc3f20c-08b5-40fd-af72-c6d14636b986": 2 - // }, - // "existingVnfGroupCounterMap": {} - // } - // ); - } public retrieveAndStoreServiceInstanceRetryTopology(jobId: string, serviceModeId : string):Observable<ServiceInstance> { @@ -561,7 +321,7 @@ export class AaiService { "instanceId":"VNF1_INSTANCE_ID", "orchStatus":null, "productFamilyId":null, - "lcpCloudRegionId":"mtn23b", + "lcpCloudRegionId":"hvf23b", "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a", "tenantName":"APPC-24595-T-IST-02C", "modelInfo":{ @@ -589,7 +349,7 @@ export class AaiService { "instanceId":"VNF2_INSTANCE_ID", "orchStatus":null, "productFamilyId":null, - "lcpCloudRegionId":"mtn23b", + "lcpCloudRegionId":"hvf23b", "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a", "tenantName":"APPC-24595-T-IST-02C", "modelInfo":{ |