Commit 89383060 authored by Walter D's avatar Walter D
Browse files

Merge branch 'ibm-entitlement-v2-fix' into 'master'

converted des context path to env variables

See merge request !146
parents 69fc9d0e 0c303783
Pipeline #52009 failed with stages
in 17 minutes and 11 seconds
......@@ -54,6 +54,11 @@ export class IbmConfig extends Config {
// Logger
public static LOGGER_LEVEL;
// DES context path
public static ENTITLEMENT_CONTEXT_PATH: string;
public static COMPLIANCE_CONTEXT_PATH: string;
public static STORAGE_CONTEXT_PATH: string;
public async init(): Promise<void> {
// data ecosystem host url and appkey
......@@ -62,6 +67,11 @@ export class IbmConfig extends Config {
IbmConfig.DES_SERVICE_HOST_STORAGE = process.env.DES_SERVICE_HOST_STORAGE;
IbmConfig.IMP_SERVICE_ACCOUNT_SIGNER = process.env.IMP_SERVICE_ACCOUNT_SIGNER;
// DES service context path
IbmConfig.ENTITLEMENT_CONTEXT_PATH = process.env.ENTITLEMENT_CONTEXT_PATH
IbmConfig.COMPLIANCE_CONTEXT_PATH = process.env.COMPLIANCE_CONTEXT_PATH
IbmConfig.STORAGE_CONTEXT_PATH = process.env.STORAGE_CONTEXT_PATH
// DES_SERVICE_HOST replaced by new variable ENTITLEMENT_HOST
IbmConfig.ENTITLEMENT_HOST = process.env.ENTITLEMENT_HOST;
IbmConfig.LEGAL_HOST = process.env.LEGAL_HOST;// DES_SERVICE_HOST replaced by new variable LEGAL_HOST
......
......@@ -7,6 +7,7 @@ import {
IDESEntitlementGroupMembersModel
} from '../../dataecosystem';
import { logger } from './logger';
import { IbmConfig } from './config';
@DataEcosystemCoreFactory.register('ibm')
export class IbmDataEcosystemServices extends AbstractDataEcosystemCore {
......@@ -57,7 +58,7 @@ export class IbmDataEcosystemServices extends AbstractDataEcosystemCore {
public getComplianceBaseUrlPath(): string {
logger.info('in IbmDataEcosystemServices.getComplianceBaseUrlPath. Returning..');
return '/api/legal/v1';
return IbmConfig.COMPLIANCE_CONTEXT_PATH;
};
public getDataPartitionIDRestHeaderName(): string {
......@@ -67,12 +68,12 @@ export class IbmDataEcosystemServices extends AbstractDataEcosystemCore {
public getEntitlementBaseUrlPath(): string {
logger.info('in IbmDataEcosystemServices.getEntitlementBaseUrlPath. Returning..');
return '/api/entitlements/v1';
return IbmConfig.ENTITLEMENT_CONTEXT_PATH;
};
public getStorageBaseUrlPath(): string {
logger.info('in IbmDataEcosystemServices.getStorageBaseUrlPath. Returning..');
return '/api/storage/v2';
return IbmConfig.STORAGE_CONTEXT_PATH;
};
public getUserAddBodyRequest(userEmail: string, role: string): { email: string, role: string } | string[] {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment