diff options
author | Lizi <li.zi30@zte.com.cn> | 2018-04-13 09:35:13 +0000 |
---|---|---|
committer | Lizi <li.zi30@zte.com.cn> | 2018-04-13 09:47:39 +0000 |
commit | d40789208a11faf3cbf3794e9d0cdb5d4c11a36d (patch) | |
tree | 084bca589493249304a903fbab5263d7fbc283ec /sdclient | |
parent | 7aff168b3bdd5a5f70b3b21930312255a3e56d94 (diff) |
Add skip tls verify when call the API of consul
Change-Id: Ib47f8eef74524e16e4bf205427b0d7be8bd353f5
Issue-ID: MSB-189
Signed-off-by: Lizi <li.zi30@zte.com.cn>
Diffstat (limited to 'sdclient')
3 files changed, 20 insertions, 2 deletions
diff --git a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/AgentService.java b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/AgentService.java index a5e21e0..225eeaf 100644 --- a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/AgentService.java +++ b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/AgentService.java @@ -1,5 +1,5 @@ /** - * Copyright 2016-2017 ZTE, Inc. and others. + * Copyright 2016-2018 ZTE, Inc. and others. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -64,6 +64,8 @@ public class AgentService implements Serializable { @JsonProperty("Timeout") private String timeout; + @JsonProperty("tls_skip_verify") + private Boolean tlsSkipVerify=true; private String status = "passing"; @@ -115,6 +117,14 @@ public class AgentService implements Serializable { this.status = status; } + public Boolean getTlsSkipVerify() { + return tlsSkipVerify; + } + + public void setTlsSkipVerify(Boolean tlsSkipVerify) { + this.tlsSkipVerify = tlsSkipVerify; + } + } diff --git a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Node.java b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Node.java index 1a1d65d..c62484b 100644 --- a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Node.java +++ b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Node.java @@ -141,6 +141,14 @@ public class Node implements Serializable { this.checkTimeOut = checkTimeOut; } + public Boolean getTls_skip_verify() { + return tls_skip_verify; + } + + public void setTls_skip_verify(Boolean tls_skip_verify) { + this.tls_skip_verify = tls_skip_verify; + } + } diff --git a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/wrapper/ConsulServiceWrapper.java b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/wrapper/ConsulServiceWrapper.java index 031a723..c999b45 100644 --- a/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/wrapper/ConsulServiceWrapper.java +++ b/sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/wrapper/ConsulServiceWrapper.java @@ -640,7 +640,7 @@ public class ConsulServiceWrapper { check.setInterval(node.getCheckInterval()); check.setHttp(node.getCheckUrl()); check.setTimeout(node.getCheckTimeOut()); - + check.setTlsSkipVerify(node.getTls_skip_verify()); checkMap.put("http", node.getCheckUrl()); checkMap.put("interval", node.getCheckInterval()); checkMap.put("timeout", node.getCheckTimeOut()); |