aboutsummaryrefslogtreecommitdiffstats
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java2
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java146
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java2
3 files changed, 5 insertions, 145 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
index 81d64b592d..7cc940ddde 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceProfileAdapter.java
@@ -63,7 +63,7 @@ public class SliceProfileAdapter implements Serializable {
private int maxBandwidth;
@JsonProperty(value = "sST")
- private String sST;
+ private String sST = "embb";
@JsonProperty(value = "activityFactor")
private int activityFactor;
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
index bfd4627b47..15dd2f791c 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java
@@ -67,150 +67,7 @@ public class SliceTaskParamsAdapter implements Serializable {
private SliceTaskInfo<SliceProfileAdapter> anSliceTaskInfo = new SliceTaskInfo<>();
- @SuppressWarnings("unchecked")
- public void convertFromJson(String jsonString) throws IOException {
- ObjectMapper mapper = new ObjectMapper();
- Map<String, String> paramMap = (Map<String, String>) mapper.readValue(jsonString, Map.class);
-
- this.setServiceName(paramMap.get("ServiceName"));
- this.setServiceId(paramMap.get("ServiceId"));
- this.setNstId(paramMap.get("NSTId"));
- this.setNstName(paramMap.get("NSTName"));
- this.setSuggestNsiId(paramMap.get("suggestNSIId"));
- this.setSuggestNsiName(paramMap.get("suggestNSIName"));
-
- this.setServiceProfile(replaceHeader(paramMap, "ServiceProfile."));
-
- SliceProfileAdapter tnBHSliceProfile = mapper.readValue(
- mapper.writeValueAsString(replaceHeader(paramMap, "SliceProfile.TN.BH.")), SliceProfileAdapter.class);
- this.tnBHSliceTaskInfo.setSliceProfile(tnBHSliceProfile);
-
- SliceProfileAdapter tnMHSliceProfile = mapper.readValue(
- mapper.writeValueAsString(replaceHeader(paramMap, "SliceProfile.TN.MH.")), SliceProfileAdapter.class);
- this.tnMHSliceTaskInfo.setSliceProfile(tnMHSliceProfile);
-
- SliceProfileAdapter tnFHSliceProfile = mapper.readValue(
- mapper.writeValueAsString(replaceHeader(paramMap, "SliceProfile.TN.FH.")), SliceProfileAdapter.class);
- this.tnFHSliceTaskInfo.setSliceProfile(tnFHSliceProfile);
-
- SliceProfileAdapter cnSliceProfile = mapper.readValue(
- mapper.writeValueAsString(replaceHeader(paramMap, "SliceProfile.CN.")), SliceProfileAdapter.class);
- this.cnSliceTaskInfo.setSliceProfile(cnSliceProfile);
-
- SliceProfileAdapter anSliceProfile = mapper.readValue(
- mapper.writeValueAsString(replaceHeader(paramMap, "SliceProfile.AN.")), SliceProfileAdapter.class);
- this.anSliceTaskInfo.setSliceProfile(anSliceProfile);
-
- this.tnBHSliceTaskInfo.setSuggestNssiId(paramMap.get("TN.BH.SuggestNSSIId"));
- this.tnBHSliceTaskInfo.setSuggestNssiName(paramMap.get("TN.BH.SuggestNSSIName"));
- this.tnBHSliceTaskInfo.setProgress(paramMap.get("TN.BH.progress"));
- this.tnBHSliceTaskInfo.setStatus(paramMap.get("TN.BH.status"));
- this.tnBHSliceTaskInfo.setStatusDescription(paramMap.get("TN.BH.statusDescription"));
- this.tnBHSliceTaskInfo.setScriptName(paramMap.get("TN.BH.ScriptName"));
-
- this.tnMHSliceTaskInfo.setSuggestNssiId(paramMap.get("TN.MH.SuggestNSSIId"));
- this.tnMHSliceTaskInfo.setSuggestNssiName(paramMap.get("TN.MH.SuggestNSSIName"));
- this.tnMHSliceTaskInfo.setProgress(paramMap.get("TN.MH.progress"));
- this.tnMHSliceTaskInfo.setStatus(paramMap.get("TN.MH.status"));
- this.tnMHSliceTaskInfo.setStatusDescription(paramMap.get("TN.MH.statusDescription"));
- this.tnMHSliceTaskInfo.setScriptName(paramMap.get("TN.MH.ScriptName"));
-
- this.tnFHSliceTaskInfo.setSuggestNssiId(paramMap.get("TN.FH.SuggestNSSIId"));
- this.tnFHSliceTaskInfo.setSuggestNssiName(paramMap.get("TN.FH.SuggestNSSIName"));
- this.tnFHSliceTaskInfo.setProgress(paramMap.get("TN.FH.progress"));
- this.tnFHSliceTaskInfo.setStatus(paramMap.get("TN.FH.status"));
- this.tnFHSliceTaskInfo.setStatusDescription(paramMap.get("TN.FH.statusDescription"));
- this.tnFHSliceTaskInfo.setScriptName(paramMap.get("TN.FH.ScriptName"));
-
- this.cnSliceTaskInfo.setSuggestNssiId(paramMap.get("CN.SuggestNSSIId"));
- this.cnSliceTaskInfo.setSuggestNssiName(paramMap.get("CN.SuggestNSSIName"));
- this.cnSliceTaskInfo.setProgress(paramMap.get("CN.progress"));
- this.cnSliceTaskInfo.setStatus(paramMap.get("CN.status"));
- this.cnSliceTaskInfo.setStatusDescription(paramMap.get("CN.statusDescription"));
- this.cnSliceTaskInfo.setScriptName(paramMap.get("CN.ScriptName"));
-
- this.anSliceTaskInfo.setSuggestNssiId(paramMap.get("AN.SuggestNSSIId"));
- this.anSliceTaskInfo.setSuggestNssiName(paramMap.get("AN.SuggestNSSIName"));
- this.anSliceTaskInfo.setProgress(paramMap.get("AN.progress"));
- this.anSliceTaskInfo.setStatus(paramMap.get("AN.status"));
- this.anSliceTaskInfo.setStatusDescription(paramMap.get("AN.statusDescription"));
- this.anSliceTaskInfo.setScriptName(paramMap.get("AN.ScriptName"));
- }
-
- public String convertToJson() {
- JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("ServiceId", serviceId);
- jsonObject.addProperty("ServiceName", serviceName);
- jsonObject.addProperty("NSTId", nstId);
- jsonObject.addProperty("NSTName", nstName);
- jsonObject.addProperty("suggestNSIId", suggestNsiId);
- jsonObject.addProperty("suggestNSIName", suggestNsiName);
-
- for (Map.Entry<String, Object> entry : serviceProfile.entrySet()) {
- jsonObject.addProperty("ServiceProfile." + entry.getKey(), entry.getValue().toString());
- }
- Map<String, Object> sliceProfileAn = bean2Map(anSliceTaskInfo.getSliceProfile());
- for (Map.Entry<String, Object> entry : sliceProfileAn.entrySet()) {
- String value = entry.getValue() == null ? "" : entry.getValue().toString();
- jsonObject.addProperty("SliceProfile.AN." + entry.getKey(), value);
- }
- Map<String, Object> sliceProfileCn = bean2Map(cnSliceTaskInfo.getSliceProfile());
- for (Map.Entry<String, Object> entry : sliceProfileCn.entrySet()) {
- String value = entry.getValue() == null ? "" : entry.getValue().toString();
- jsonObject.addProperty("SliceProfile.CN." + entry.getKey(), value);
- }
- Map<String, Object> sliceProfileTnBH = bean2Map(tnBHSliceTaskInfo.getSliceProfile());
- for (Map.Entry<String, Object> entry : sliceProfileTnBH.entrySet()) {
- String value = entry.getValue() == null ? "" : entry.getValue().toString();
- jsonObject.addProperty("SliceProfile.TN.BH." + entry.getKey(), value);
- }
- Map<String, Object> sliceProfileTnMH = bean2Map(tnMHSliceTaskInfo.getSliceProfile());
- for (Map.Entry<String, Object> entry : sliceProfileTnMH.entrySet()) {
- String value = entry.getValue() == null ? "" : entry.getValue().toString();
- jsonObject.addProperty("SliceProfile.TN.MH." + entry.getKey(), value);
- }
- Map<String, Object> sliceProfileTnFH = bean2Map(tnFHSliceTaskInfo.getSliceProfile());
- for (Map.Entry<String, Object> entry : sliceProfileTnFH.entrySet()) {
- String value = entry.getValue() == null ? "" : entry.getValue().toString();
- jsonObject.addProperty("SliceProfile.TN.FH." + entry.getKey(), value);
- }
- jsonObject.addProperty("TN.BH.SuggestNSSIId", tnBHSliceTaskInfo.getSuggestNssiId());
- jsonObject.addProperty("TN.BH.SuggestNSSIName", tnBHSliceTaskInfo.getSuggestNssiName());
- jsonObject.addProperty("TN.BH.progress", tnBHSliceTaskInfo.getProgress());
- jsonObject.addProperty("TN.BH.status", tnBHSliceTaskInfo.getStatus());
- jsonObject.addProperty("TN.BH.statusDescription", tnBHSliceTaskInfo.getStatusDescription());
- jsonObject.addProperty("TN.BH.ScriptName", tnBHSliceTaskInfo.getScriptName());
-
- jsonObject.addProperty("TN.MH.SuggestNSSIId", tnMHSliceTaskInfo.getSuggestNssiId());
- jsonObject.addProperty("TN.MH.SuggestNSSIName", tnMHSliceTaskInfo.getSuggestNssiName());
- jsonObject.addProperty("TN.MH.progress", tnMHSliceTaskInfo.getProgress());
- jsonObject.addProperty("TN.MH.status", tnMHSliceTaskInfo.getStatus());
- jsonObject.addProperty("TN.MH.statusDescription", tnMHSliceTaskInfo.getStatusDescription());
- jsonObject.addProperty("TN.MH.ScriptName", tnMHSliceTaskInfo.getScriptName());
-
- jsonObject.addProperty("TN.FH.SuggestNSSIId", tnFHSliceTaskInfo.getSuggestNssiId());
- jsonObject.addProperty("TN.FH.SuggestNSSIName", tnFHSliceTaskInfo.getSuggestNssiName());
- jsonObject.addProperty("TN.FH.progress", tnFHSliceTaskInfo.getProgress());
- jsonObject.addProperty("TN.FH.status", tnFHSliceTaskInfo.getStatus());
- jsonObject.addProperty("TN.FH.statusDescription", tnFHSliceTaskInfo.getStatusDescription());
- jsonObject.addProperty("TN.FH.ScriptName", tnFHSliceTaskInfo.getScriptName());
-
- jsonObject.addProperty("CN.SuggestNSSIId", cnSliceTaskInfo.getSuggestNssiId());
- jsonObject.addProperty("CN.SuggestNSSIName", cnSliceTaskInfo.getSuggestNssiName());
- jsonObject.addProperty("CN.progress", cnSliceTaskInfo.getProgress());
- jsonObject.addProperty("CN.status", cnSliceTaskInfo.getStatus());
- jsonObject.addProperty("CN.statusDescription", cnSliceTaskInfo.getStatusDescription());
- jsonObject.addProperty("CN.ScriptName", cnSliceTaskInfo.getScriptName());
-
- jsonObject.addProperty("AN.SuggestNSSIId", anSliceTaskInfo.getSuggestNssiId());
- jsonObject.addProperty("AN.SuggestNSSIName", anSliceTaskInfo.getSuggestNssiName());
- jsonObject.addProperty("AN.progress", anSliceTaskInfo.getProgress());
- jsonObject.addProperty("AN.status", anSliceTaskInfo.getStatus());
- jsonObject.addProperty("AN.statusDescription", anSliceTaskInfo.getStatusDescription());
- jsonObject.addProperty("AN.ScriptName", anSliceTaskInfo.getScriptName());
-
- return jsonObject.toString();
- }
+ private SliceTaskInfo<SliceProfileAdapter> anNFSliceTaskInfo = new SliceTaskInfo<>();
/**
* change T t to {@link Map}
@@ -266,3 +123,4 @@ public class SliceTaskParamsAdapter implements Serializable {
return sliceProfileMap;
}
}
+
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java
index 536bb04fce..6f56a72632 100644
--- a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java
+++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java
@@ -26,6 +26,8 @@ import org.onap.so.beans.nsmf.NetworkType;
public enum SubnetType {
AN("AN", NetworkType.ACCESS),
+ AN_NF("AN_NF", NetworkType.ACCESS),
+
CN("CN", NetworkType.CORE),
TN_FH("TN_FH", NetworkType.TRANSPORT),