aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-01-30 16:37:27 +0100
committersebdet <sebastien.determe@intl.att.com>2020-01-30 16:37:27 +0100
commitf2d71ebde9dcd13d3181ba343ad82e728b30bf73 (patch)
tree75d24d0ebe7d880ab0655f5e2565728c4d7ec42d /src/main/java
parentb9a6531c7a5cfc5a9a544a21fe8c47914be9699b (diff)
Remove blueprintId in loop
Remove the blueprint Id for DCAE in loop object as now the one in loop template will be used. Issue-ID: CLAMP-592 Change-Id: Ie86f362451d58de07f7a715ae0bfc92566893e13 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/clamp/loop/Loop.java12
-rw-r--r--src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java12
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();
}