aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
diff options
context:
space:
mode:
authorSourabh Sourabh <sourabh.sourabh@est.tech>2024-09-17 09:16:08 +0000
committerGerrit Code Review <gerrit@onap.org>2024-09-17 09:16:08 +0000
commit03d2e8607ecfa0502ea93335243c56752ee66f92 (patch)
treef98efaac373d9cbf0e4b4e97bb4aed24ed70571e /cps-ncmp-service/src
parent3cf653576440e233d195e2e54851aec833ee9922 (diff)
parent6191d41c8d8ee20f0388172faf57e2bf8bbf8862 (diff)
Merge "Policy Executor API: Add Prefix in Yaml"
Diffstat (limited to 'cps-ncmp-service/src')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java
index b3aa848394..96771e30f1 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/policyexecutor/PolicyExecutor.java
@@ -121,7 +121,6 @@ public class PolicyExecutor {
"Invalid Json: " + changeRequestAsJson);
}
}
-
final Map<String, Object> request = new HashMap<>(2);
request.put("schema", getAssociatedPolicyDataSchemaName(operationType));
request.put("data", data);
@@ -144,7 +143,7 @@ public class PolicyExecutor {
final String authorization,
final String resourceIdentifier,
final String changeRequestAsJson) {
- final String serviceBaseUrl = serverAddress + ":" + serverPort;
+
final Map<String, Object> requestAsMap = getSingleRequestAsMap(yangModelCmHandle,
operationType,
@@ -154,8 +153,9 @@ public class PolicyExecutor {
final Object bodyAsObject = createBodyAsObject(Collections.singletonList(requestAsMap));
final UrlTemplateParameters urlTemplateParameters = RestServiceUrlTemplateBuilder.newInstance()
- .fixedPathSegment("execute")
- .createUrlTemplateParameters(serviceBaseUrl, "");
+ .fixedPathSegment("execute")
+ .createUrlTemplateParameters(String.format("%s:%s", serverAddress, serverPort),
+ "policy-executor/api");
return policyExecutorWebClient.post()
.uri(urlTemplateParameters.urlTemplate(), urlTemplateParameters.urlVariables())