2 * Copyright 2016-2018 ZTE, Inc. and others.
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
14 package org.onap.msb.sdclient.core;
16 import java.io.Serializable;
18 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20 import io.swagger.annotations.ApiModelProperty;
22 @JsonIgnoreProperties(ignoreUnknown = true)
23 public class Node implements Serializable {
24 private static final long serialVersionUID = 1L;
26 @ApiModelProperty(example = "127.0.0.1", required = true)
29 @ApiModelProperty(example = "80", required = true)
33 // loadbalance policy parameter
34 @ApiModelProperty(value = "lb node params", allowableValues = "weight,max_fails,fail_timeout",
35 example = "weight=5,max_fails=3,fail_timeout=30s")
36 private String lb_server_params;
38 // health check parameter
39 @ApiModelProperty(value = "health check type", allowableValues = "TTL,HTTP,TCP", example = "TTL")
40 private String checkType = "";
42 @ApiModelProperty(value = "health check URL,applies only to TCP or HTTP", example = "http://localhost:5000/health")
43 private String checkUrl = "";
45 @ApiModelProperty(value = "TCP or HTTP health check Interval,Unit: second", example = "10s")
46 private String checkInterval;
48 @ApiModelProperty(value = "TCP or HTTP health check TimeOut,Unit: second", example = "10s")
49 private String checkTimeOut;
51 @ApiModelProperty(value = "TTL health check Interval,Unit: second", example = "10s")
54 @ApiModelProperty(value = "health check skip TLS verify, applies only to HTTPs", allowableValues = "true, false")
55 private Boolean tls_skip_verify = true;
57 @ApiModelProperty(value = "Instance HA_role", allowableValues = "active,standby", example = "active")
58 private String ha_role = "";
62 public String getHa_role() {
66 public void setHa_role(String ha_role) {
67 this.ha_role = ha_role;
70 public String getIp() {
74 public void setIp(String ip) {
78 public String getPort() {
82 public void setPort(String port) {
86 public String getTtl() {
90 public void setTtl(String ttl) {
98 public Node(String ip, String port) {
103 public String getLb_server_params() {
104 return lb_server_params;
107 public void setLb_server_params(String lb_server_params) {
108 this.lb_server_params = lb_server_params;
112 public String getCheckType() {
116 public void setCheckType(String checkType) {
117 this.checkType = checkType;
120 public String getCheckUrl() {
124 public void setCheckUrl(String checkUrl) {
125 this.checkUrl = checkUrl;
128 public String getCheckInterval() {
129 return checkInterval;
132 public void setCheckInterval(String checkInterval) {
133 this.checkInterval = checkInterval;
136 public String getCheckTimeOut() {
140 public void setCheckTimeOut(String checkTimeOut) {
141 this.checkTimeOut = checkTimeOut;