diff options
author | xuegao <xg353y@intl.att.com> | 2020-02-13 10:35:39 +0100 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2020-02-13 11:34:26 +0100 |
commit | 4c2423d5e53a8021cb100eb3862efa2c3e7d713e (patch) | |
tree | d07abf9a91cfc5ba4ef2f6b57f0a4f55b044cb02 /src/main | |
parent | f4709e13c38a15c889d3550d707b8e2c40187195 (diff) |
Fix deploy flow bug
Fix the bug in the deploy flow for multi blueprint cases.
Issue-ID: CLAMP-571
Change-Id: I368cefafcba34a8ba3bd6be1eb22064995364d23
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java | 8 | ||||
-rw-r--r-- | src/main/resources/clds/camel/routes/dcae-flows.xml | 2 |
2 files changed, 5 insertions, 5 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 7c0e3ccbb..ca26b136d 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 8088c2a40..f40207cc7 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" |