diff options
author | Xue Gao <xg353y@intl.att.com> | 2020-01-30 15:51:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-30 15:51:58 +0000 |
commit | 8d91398da6162c19643f3f7cae83327dd4e81263 (patch) | |
tree | 9122ca4e5ae8df49bb8c1cac370837d315e116ad /src/main/java/org/onap | |
parent | c7b3e23f499d02f181e5d01d680118fe4cbdd6f0 (diff) | |
parent | f2d71ebde9dcd13d3181ba343ad82e728b30bf73 (diff) |
Merge "Remove blueprintId in loop"
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r-- | src/main/java/org/onap/clamp/loop/Loop.java | 12 | ||||
-rw-r--r-- | src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java | 12 |
2 files changed, 7 insertions, 17 deletions
diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java index 66fd56579..339812672 100644 --- a/src/main/java/org/onap/clamp/loop/Loop.java +++ b/src/main/java/org/onap/clamp/loop/Loop.java @@ -92,10 +92,6 @@ public class Loop extends AuditEntity implements Serializable { @Column(name = "dcae_deployment_status_url") private String dcaeDeploymentStatusUrl; - @Expose - @Column(name = "dcae_blueprint_id") - private String dcaeBlueprintId; - @Column(columnDefinition = "MEDIUMTEXT", name = "svg_representation") private String svgRepresentation; @@ -248,14 +244,6 @@ public class Loop extends AuditEntity implements Serializable { this.loopLogs.add(log); } - public String getDcaeBlueprintId() { - return dcaeBlueprintId; - } - - void setDcaeBlueprintId(String dcaeBlueprintId) { - this.dcaeBlueprintId = dcaeBlueprintId; - } - public Service getModelService() { return modelService; } 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 acb7190f7..21960e387 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 @@ -24,16 +24,17 @@ package org.onap.clamp.loop.components.external; import com.google.gson.JsonObject; + import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.UUID; + import org.apache.camel.Exchange; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; - import org.onap.clamp.clds.model.dcae.DcaeInventoryResponse; import org.onap.clamp.clds.model.dcae.DcaeOperationStatusResponse; import org.onap.clamp.clds.util.JsonUtils; @@ -92,6 +93,7 @@ public class DcaeComponent extends ExternalComponent { return null; } } + /** * Generate the deployment id, it's random. * @@ -122,7 +124,7 @@ public class DcaeComponent extends ExternalComponent { JsonObject globalProp = loop.getGlobalPropertiesJson(); JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER); - String serviceTypeId = loop.getDcaeBlueprintId(); + String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId(); JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, serviceTypeId); @@ -135,7 +137,7 @@ public class DcaeComponent extends ExternalComponent { /** * Return the deploy payload for DCAE. * - * @param loop The loop object + * @param loop The loop object * @param microServiceName The micro service name * @return The payload used to send deploy closed loop request */ @@ -143,7 +145,7 @@ public class DcaeComponent extends ExternalComponent { JsonObject globalProp = loop.getGlobalPropertiesJson(); JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(microServiceName); - String serviceTypeId = loop.getDcaeBlueprintId(); + String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId(); JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, serviceTypeId); @@ -161,7 +163,7 @@ public class DcaeComponent extends ExternalComponent { */ public static String getUndeployPayload(Loop loop) { JsonObject rootObject = new JsonObject(); - rootObject.addProperty(DCAE_SERVICETYPE_ID, loop.getDcaeBlueprintId()); + rootObject.addProperty(DCAE_SERVICETYPE_ID, loop.getLoopTemplate().getDcaeBlueprintId()); return rootObject.toString(); } |