summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2021-07-19 19:12:58 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2021-07-19 19:12:58 +0800
commitaf62330fbd26c576564a4170b2ff271ca606ee93 (patch)
tree04af01d27c0e8fb9eaefb9387a656798bbf79f30 /rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java
parentf689d98b533d7687bbca01a8013bea5cc4e071cc (diff)
Updated holmes-actions to 1.3.5
Change-Id: Id310ceec3ab8d22032365742eac57f7ce2c3cc74 Issue-ID: HOLMES-461 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java')
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/DcaeConfigurationPolling.java6
1 files changed, 3 insertions, 3 deletions
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());
}
});