Add skip tls verify when call the API of consul 97/42697/2
authorLizi <li.zi30@zte.com.cn>
Fri, 13 Apr 2018 09:35:13 +0000 (09:35 +0000)
committerLizi <li.zi30@zte.com.cn>
Fri, 13 Apr 2018 09:47:39 +0000 (09:47 +0000)
Change-Id: Ib47f8eef74524e16e4bf205427b0d7be8bd353f5
Issue-ID: MSB-189
Signed-off-by: Lizi <li.zi30@zte.com.cn>
sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/AgentService.java
sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/core/Node.java
sdclient/discovery-service/src/main/java/org/onap/msb/sdclient/wrapper/ConsulServiceWrapper.java

index a5e21e0..225eeaf 100644 (file)
@@ -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;
+        }
+
 
     }
 
index 1a1d65d..c62484b 100644 (file)
@@ -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;
+    }
+
 
 
 }
index 031a723..c999b45 100644 (file)
@@ -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());