aboutsummaryrefslogtreecommitdiffstats
path: root/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
diff options
context:
space:
mode:
authorTomasz Wrobel <tomasz.wrobel@nokia.com>2021-08-10 16:00:23 +0200
committerTomasz Wrobel <tomasz.wrobel@nokia.com>2021-08-11 09:41:17 +0200
commita422056b28ed77f19784725bee319fc2faeaa593 (patch)
treeaebe330bff80f046c0c45c58b425c31105c46115 /prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
parent945b2458c1f409212f06e0c358a81120b9ea38c5 (diff)
Change AAI variable syntax
Issue-ID: DCAEGEN2-2863 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: I4e7a2a29edcd85867065ce0457848b42dbfb0db2
Diffstat (limited to 'prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java')
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
index 26fb8491..93efa8c3 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClient.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* DCAEGEN2-SERVICES-SDK
* ================================================================================
- * Copyright (C) 2019 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 NOKIA Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,6 +41,9 @@ public class AaiGetServiceInstanceClient implements
private static final String SERVICE_TYPE = "serviceType";
private static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
+ private static final String VARIABLE_PREFIX = "{{";
+ private static final String VARIABLE_SUFFIX = "}}";
+
private final RxHttpClient httpClient;
private final AaiClientConfiguration configuration;
@@ -57,7 +60,8 @@ public class AaiGetServiceInstanceClient implements
SERVICE_TYPE, aaiModel.serviceType(),
SERVICE_INSTANCE_ID, aaiModel.serviceInstanceId());
- final StringSubstitutor substitutor = new StringSubstitutor(mapping.toJavaMap());
+ final StringSubstitutor substitutor =
+ new StringSubstitutor(mapping.toJavaMap(), VARIABLE_PREFIX, VARIABLE_SUFFIX);
final String endpoint = substitutor.replace(configuration.aaiServiceInstancePath());
return httpClient.call(ImmutableHttpRequest.builder()