This commit is contained in:
nkorange 2018-12-05 14:11:03 +08:00
parent 0a1d949fd4
commit cce2679670

View File

@ -314,6 +314,8 @@ public class ApiCommands {
ipAddress.setWeight(clientBeat.getWeight()); ipAddress.setWeight(clientBeat.getWeight());
ipAddress.setMetadata(clientBeat.getMetadata()); ipAddress.setMetadata(clientBeat.getMetadata());
ipAddress.setClusterName(clusterName); ipAddress.setClusterName(clusterName);
ipAddress.setServiceName(dom);
ipAddress.setInstanceId(ipAddress.generateInstanceId());
if (!virtualClusterDomain.getClusterMap().containsKey(ipAddress.getClusterName())) { if (!virtualClusterDomain.getClusterMap().containsKey(ipAddress.getClusterName())) {
doAddCluster4Dom(MockHttpRequest.buildRequest(stringMap)); doAddCluster4Dom(MockHttpRequest.buildRequest(stringMap));
@ -1215,6 +1217,8 @@ public class ApiCommands {
ipObj.put("metadata", ip.getMetadata()); ipObj.put("metadata", ip.getMetadata());
ipObj.put("enabled", ip.isEnabled()); ipObj.put("enabled", ip.isEnabled());
ipObj.put("weight", ip.getWeight()); ipObj.put("weight", ip.getWeight());
ipObj.put("clusterName", ip.getClusterName());
ipObj.put("serviceName", ip.getServiceName());
hosts.add(ipObj); hosts.add(ipObj);
} }