diff options
author | Ittay Stern <ittay.stern@att.com> | 2020-02-18 16:58:16 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-02-20 08:43:02 +0200 |
commit | e2a7abb45b953d405fc5aa1917f74e2da9f188c0 (patch) | |
tree | 725c3abc6b4e835e2c1aa01872358164ab2752ee /vid-webpack-master/src/app/shared/services/aaiService | |
parent | 2f60aa71dc51b6748ead045d363fd2f0d7f50286 (diff) |
VNF's LCP regions found by Line-of-business (and owning-entity)
Depends on FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS
Issue-ID: VID-758
Change-Id: I7b5a67202a72fc6ea4afe0a5c1c60657c93bf690
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/services/aaiService')
-rw-r--r-- | vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts | 48 |
1 files changed, 47 insertions, 1 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 9026a5648..603ba814d 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 @@ -29,7 +29,14 @@ import {VnfInstance} from "../../models/vnfInstance"; import {VfModuleInstance} from "../../models/vfModuleInstance"; import {ServiceInstance} from "../../models/serviceInstance"; import {VfModuleMap} from "../../models/vfModulesMap"; -import {updateAicZones, updateCategoryParameters, updateLcpRegionsAndTenants, updateServiceTypes, updateSubscribers, updateUserId} from "../../storeUtil/utils/general/general.actions"; +import { + updateAicZones, + updateCategoryParameters, + updateLcpRegionsAndTenants, + updateServiceTypes, + updateSubscribers, + updateUserId +} from "../../storeUtil/utils/general/general.actions"; import {createServiceInstance, updateModel,} from "../../storeUtil/utils/service/service.actions"; import {FeatureFlagsService, Features} from "../featureFlag/feature-flags.service"; import {VnfMember} from "../../models/VnfMember"; @@ -221,6 +228,45 @@ export class AaiService { cloudRegionId+AaiService.formatCloudOwnerTrailer(cloudOwner) : cloudRegionId; }; + + + + + getLcpRegionsByOwningEntityAndLineOfBusiness = (owningEntityName, lineOfBusinessName): Observable<LcpRegion[]> => { + // let pathQuery: string = Constants.Path.AAI_GET_LCP_REGIONS_BY____ + // + "?" + // + "owningEntityName=" + owningEntityName + // + "lineOfBusinessName=" + lineOfBusinessName; + + return of([ + new LcpRegion("foo-id", "foo-name", true, "foo-cloud-owner"), + new LcpRegion("foo2-id", "foo2-name", true, "foo2-cloud-owner"), + ]); + }; + + + getTenantsByCloudOwnerAndCloudRegionId = (cloudOwner, cloudRegionId): Observable<Tenant[]> => { + // let pathQuery: string = Constants.Path.AAI_GET_TENANTS_BY____ + // + "?" + // + "cloudOwner=" + cloudOwner + // + "&cloudRegionId=" + cloudRegionId; + + return of([ + new Tenant({ + tenantID: "tenantID", tenantName: "tenantName", + cloudOwner: "cloudOwner", ['is-permitted']: true, + }), + new Tenant({ + tenantID: "tenant2ID", tenantName: "tenant2Name", + cloudOwner: "cloudOwner", ['is-permitted']: true, + }), + ]) + }; + + + + + public static formatCloudOwnerTrailer(cloudOwner: string):string { return " ("+ cloudOwner.trim().toLowerCase().replace(/^[^-]*-/, "").toUpperCase() + ")"; } |