summaryrefslogtreecommitdiffstats
path: root/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java
diff options
context:
space:
mode:
Diffstat (limited to 'components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java')
-rw-r--r--components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java40
1 files changed, 25 insertions, 15 deletions
diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java
index 4b5fe2ed..c1599517 100644
--- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java
+++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/Configuration.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2020-2022 Wipro Limited.
* Copyright (C) 2022 Huawei Canada Limited.
+ * Copyright (C) 2022 Huawei Technologies Co., Ltd.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,12 +70,12 @@ public class Configuration {
private String rannfnssiDetailsTemplateId;
private String desUrl;
private int pmDataDurationInWeeks;
-
private int vesNotifPollingInterval;
private String vesNotifChangeIdentifier;
private String vesNotifChangeType;
private int ccvpnEvalInterval;
- private double ccvpnEvalThreshold;
+ private double ccvpnEvalUpperThreshold;
+ private double ccvpnEvalLowerThreshold;
private double ccvpnEvalPrecision;
private String aaiNotifTargetAction;
private String aaiNotifTargetSource;
@@ -108,15 +109,21 @@ public class Configuration {
@Override
public String toString() {
- return "Configuration [pgHost=" + pgHost + ", pgPort=" + pgPort + ", pgUsername=" + pgUsername + ", pgPassword="
- + pgPassword + ", dmaapServers=" + dmaapServers + ", configDbService=" + configDbService + ", cpsUrl="
- + cpsUrl + ", aaiUrl=" + aaiUrl + ", configDbEnabled=" + configDbEnabled + ", cg=" + cg + ", cid=" + cid
- + ", pollingInterval=" + pollingInterval + ", pollingTimeout=" + pollingTimeout + ", aafUsername="
- + aafUsername + ", aafPassword=" + aafPassword + ", streamsSubscribes=" + streamsSubscribes
- + ", streamsPublishes=" + streamsPublishes + ", samples=" + samples + ", minPercentageChange="
- + minPercentageChange + ", initialDelaySeconds=" + initialDelaySeconds + ", rannfnssiDetailsTemplateId="
- + rannfnssiDetailsTemplateId + ", desUrl=" + desUrl + ", pmDataDurationInWeeks=" + pmDataDurationInWeeks
- + "]";
+ return "Configuration [pgHost=" + pgHost + ", pgPort=" + pgPort + ", pgUsername=" + pgUsername +
+ ", dmaapServers=" + dmaapServers + ", configDbService=" + configDbService + ", cpsUrl="
+ + cpsUrl + ", aaiUrl=" + aaiUrl + ", configDbEnabled=" + configDbEnabled + ", cg=" + cg + ", cid=" + cid
+ + ", pollingInterval=" + pollingInterval + ", pollingTimeout=" + pollingTimeout + ", aafUsername="
+ + aafUsername + ", streamsSubscribes=" + streamsSubscribes
+ + ", streamsPublishes=" + streamsPublishes + ", samples=" + samples + ", minPercentageChange="
+ + minPercentageChange + ", initialDelaySeconds=" + initialDelaySeconds + ", rannfnssiDetailsTemplateId="
+ + rannfnssiDetailsTemplateId + ", desUrl=" + desUrl + ", pmDataDurationInWeeks=" + pmDataDurationInWeeks
+ + ", vesNotifPollingInterval=" + vesNotifPollingInterval + ", vesNotifChangeIdentifier="
+ + vesNotifChangeIdentifier + ", vesNotifChangeIdentifier=" + vesNotifChangeType + ", ccvpnEvalInterval=" +
+ ccvpnEvalInterval + ", ccvpnEvalUpperThreshold=" + ccvpnEvalUpperThreshold + ", ccvpnEvalLowerThreshold=" +
+ ccvpnEvalLowerThreshold + ", ccvpnEvalPrecision=" + ccvpnEvalPrecision + ", aaiNotifTargetAction=" +
+ aaiNotifTargetAction + ", aaiNotifTargetSource=" + aaiNotifTargetSource + ", aaiNotifTargetEntity=" +
+ aaiNotifTargetEntity + ", ccvpnEvalPeriodicCheckOn=" + ccvpnEvalPeriodicCheckOn +
+ ", ccvpnEvalOnDemandCheckOn=" + ccvpnEvalOnDemandCheckOn + ", ccvpnEvalStrategy=" + ccvpnEvalStrategy + "]";
}
/**
@@ -126,7 +133,8 @@ public class Configuration {
log.info("Updating configuration from CBS");
- Type mapType = new TypeToken<Map<String, Object>>() {}.getType();
+ Type mapType = new TypeToken<Map<String, Object>>() {
+ }.getType();
JsonObject subscribes = jsonObject.getAsJsonObject("streams_subscribes");
streamsSubscribes = new Gson().fromJson(subscribes, mapType);
@@ -141,7 +149,8 @@ public class Configuration {
pgHost = jsonObject.get("postgres.host").getAsString();
JsonArray servers = jsonObject.getAsJsonArray("sliceanalysisms.dmaap.server");
- Type listType = new TypeToken<List<String>>() {}.getType();
+ Type listType = new TypeToken<List<String>>() {
+ }.getType();
dmaapServers = new Gson().fromJson(servers, listType);
cg = jsonObject.get("sliceanalysisms.cg").getAsString();
@@ -165,7 +174,8 @@ public class Configuration {
aaiNotifTargetSource = jsonObject.get("sliceanalysisms.aaiNotif.targetSource").getAsString();
aaiNotifTargetEntity = jsonObject.get("sliceanalysisms.aaiNotif.targetEntity").getAsString();
ccvpnEvalInterval = jsonObject.get("sliceanalysisms.ccvpnEvalInterval").getAsInt();
- ccvpnEvalThreshold = jsonObject.get("sliceanalysisms.ccvpnEvalThreshold").getAsDouble();
+ ccvpnEvalUpperThreshold = jsonObject.get("sliceanalysisms.ccvpnEvalUpperThreshold").getAsDouble();
+ ccvpnEvalLowerThreshold = jsonObject.get("sliceanalysisms.ccvpnEvalLowerThreshold").getAsDouble();
ccvpnEvalPrecision = jsonObject.get("sliceanalysisms.ccvpnEvalPrecision").getAsDouble();
ccvpnEvalPeriodicCheckOn = jsonObject.get("sliceanalysisms.ccvpnEvalPeriodicCheckOn").getAsBoolean();
ccvpnEvalOnDemandCheckOn = jsonObject.get("sliceanalysisms.ccvpnEvalOnDemandCheckOn").getAsBoolean();
@@ -191,6 +201,6 @@ public class Configuration {
} else {
cpsUrl = jsonObject.get("sliceanalysisms.cps.url").getAsString();
}
- log.info("configuration from CBS {}", this);
+ log.info("configuration from CBS has been updated to {}", this);
}
}