summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-02-14 11:54:58 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-14 11:54:58 +0000
commit728ad5ce6d3b5e3d973b6349469f96d6c3600fef (patch)
treeffbc809fdde510a27bffbecffdc61935e90f3ea6 /src
parent2e787e297189408a64acded28883b0b5e731bf25 (diff)
parent4c2423d5e53a8021cb100eb3862efa2c3e7d713e (diff)
Merge "Fix deploy flow bug"
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java8
-rw-r--r--src/main/resources/clds/camel/routes/dcae-flows.xml2
-rw-r--r--src/test/resources/clds/camel/routes/dcae-flows.xml2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
index 7c0e3ccb..ca26b136 100644
--- a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
+++ b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java
@@ -147,14 +147,14 @@ public class DcaeComponent extends ExternalComponent {
* Return the deploy payload for DCAE.
*
* @param loop The loop object
- * @param microServiceName The micro service name
+ * @param microServicePolicy The micro service policy
* @return The payload used to send deploy closed loop request
*/
- public static String getDeployPayload(Loop loop, String microServiceName) {
+ public static String getDeployPayload(Loop loop, MicroServicePolicy microServicePolicy) {
JsonObject globalProp = loop.getGlobalPropertiesJson();
- JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(microServiceName);
+ JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(microServicePolicy.getName());
- String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId();
+ String serviceTypeId = microServicePolicy.getDcaeBlueprintId();
JsonObject rootObject = new JsonObject();
rootObject.addProperty(DCAE_SERVICETYPE_ID, serviceTypeId);
diff --git a/src/main/resources/clds/camel/routes/dcae-flows.xml b/src/main/resources/clds/camel/routes/dcae-flows.xml
index 8088c2a4..f40207cc 100644
--- a/src/main/resources/clds/camel/routes/dcae-flows.xml
+++ b/src/main/resources/clds/camel/routes/dcae-flows.xml
@@ -35,7 +35,7 @@
</setProperty>
<setBody>
<method ref="org.onap.clamp.loop.components.external.DcaeComponent"
- method="getDeployPayload(${exchangeProperty[loopObject]},${exchangeProperty[microServicePolicy].getName()})" />
+ method="getDeployPayload(${exchangeProperty[loopObject]},${exchangeProperty[microServicePolicy]})" />
</setBody>
<setProperty propertyName="dcaeDeploymentId">
<method ref="org.onap.clamp.loop.components.external.DcaeComponent"
diff --git a/src/test/resources/clds/camel/routes/dcae-flows.xml b/src/test/resources/clds/camel/routes/dcae-flows.xml
index 8088c2a4..f40207cc 100644
--- a/src/test/resources/clds/camel/routes/dcae-flows.xml
+++ b/src/test/resources/clds/camel/routes/dcae-flows.xml
@@ -35,7 +35,7 @@
</setProperty>
<setBody>
<method ref="org.onap.clamp.loop.components.external.DcaeComponent"
- method="getDeployPayload(${exchangeProperty[loopObject]},${exchangeProperty[microServicePolicy].getName()})" />
+ method="getDeployPayload(${exchangeProperty[loopObject]},${exchangeProperty[microServicePolicy]})" />
</setBody>
<setProperty propertyName="dcaeDeploymentId">
<method ref="org.onap.clamp.loop.components.external.DcaeComponent"