summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java6
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/bolt/enginebolt/EngineService.java6
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java6
4 files changed, 10 insertions, 10 deletions
diff --git a/pom.xml b/pom.xml
index bac7610..ec1c6d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,7 +130,7 @@
<dependency>
<groupId>org.onap.holmes.common</groupId>
<artifactId>holmes-actions</artifactId>
- <version>1.3.4</version>
+ <version>1.3.5</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.containers</groupId>
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
index 6769d65..2a618a7 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
@@ -68,14 +68,14 @@ public class Initializer {
Node node = new Node();
node.setIp(isIpAddress(serviceIpAndPort[0]) ? serviceIpAndPort[0] : getEnv("HOLMES_RULE_MGMT_SERVICE_HOST"));
node.setPort("9101");
- /* Following codes will cause an unregistration from MSB (due to MSB malfunction), comment them for now
+ /* Following codes will cause an unregistration from MSB (due to MSB malfunction), comment them for now*/
String msbAddrTemplate = (CommonUtils.isHttpsEnabled() ? "https" : "http")
+ "://%s:%s/api/holmes-rule-mgmt/v1/healthcheck";
node.setCheckType("HTTP");
- node.setCheckUrl(String.format(msbAddrTemplate, serviceAddrInfo[0], "9101"));
+ node.setCheckUrl(String.format(msbAddrTemplate, serviceIpAndPort[0], "9101"));
node.setCheckTimeOut("60s");
node.setCheckInterval("60s");
- */
+
nodes.add(node);
msinfo.setNodes(nodes);
return msinfo;
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/bolt/enginebolt/EngineService.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/bolt/enginebolt/EngineService.java
index 87d9e55..4b6e248 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/bolt/enginebolt/EngineService.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/bolt/enginebolt/EngineService.java
@@ -34,19 +34,19 @@ public class EngineService {
private static final String COLON = ":";
protected boolean delete(String packageName, String ip) {
- return new JerseyClient()
+ return JerseyClient.newInstance()
.path(packageName)
.delete(getUrl(ip)) != null;
}
protected boolean check(CorrelationCheckRule4Engine correlationCheckRule4Engine, String ip) {
- return new JerseyClient()
+ return JerseyClient.newInstance()
.header("Accept", MediaType.APPLICATION_JSON)
.post(getUrl(ip), Entity.json(correlationCheckRule4Engine)) != null;
}
protected String deploy(CorrelationDeployRule4Engine correlationDeployRule4Engine, String ip) {
- return new JerseyClient()
+ return JerseyClient.newInstance()
.header("Accept", MediaType.APPLICATION_JSON)
.put(getUrl(ip), Entity.json(correlationDeployRule4Engine));
}
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java
index 036bd9a..f07d8ac 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java
@@ -84,14 +84,14 @@ public class DcaeConfigurationPolling implements Runnable {
}
private RuleQueryListResponse getAllCorrelationRules() {
- return new JerseyClient().get(url, RuleQueryListResponse.class);
+ return JerseyClient.newInstance().get(url, RuleQueryListResponse.class);
}
private boolean addAllCorrelationRules(DcaeConfigurations dcaeConfigurations) throws CorrelationException {
boolean suc = false;
for (Rule rule : dcaeConfigurations.getDefaultRules()) {
RuleCreateRequest ruleCreateRequest = getRuleCreateRequest(rule);
- suc = new JerseyClient().header("Accept", MediaType.APPLICATION_JSON)
+ suc = JerseyClient.newInstance().header("Accept", MediaType.APPLICATION_JSON)
.put(url, Entity.json(ruleCreateRequest)) != null;
if (!suc) {
@@ -103,7 +103,7 @@ public class DcaeConfigurationPolling implements Runnable {
private void deleteAllCorrelationRules(List<RuleResult4API> ruleResult4APIs) {
ruleResult4APIs.forEach(correlationRule -> {
- if (null == new JerseyClient().delete(url + "/" + correlationRule.getRuleId())) {
+ if (null == JerseyClient.newInstance().delete(url + "/" + correlationRule.getRuleId())) {
log.warn("Failed to delete rule, the rule id is: {}", correlationRule.getRuleId());
}
});