From cce267967056c165aab126625056300069341e7c Mon Sep 17 00:00:00 2001 From: nkorange Date: Wed, 5 Dec 2018 14:11:03 +0800 Subject: [PATCH] Fix #388 --- .../main/java/com/alibaba/nacos/naming/web/ApiCommands.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java b/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java index 0d35ea9c3..727d8d722 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/ApiCommands.java @@ -314,6 +314,8 @@ public class ApiCommands { ipAddress.setWeight(clientBeat.getWeight()); ipAddress.setMetadata(clientBeat.getMetadata()); ipAddress.setClusterName(clusterName); + ipAddress.setServiceName(dom); + ipAddress.setInstanceId(ipAddress.generateInstanceId()); if (!virtualClusterDomain.getClusterMap().containsKey(ipAddress.getClusterName())) { doAddCluster4Dom(MockHttpRequest.buildRequest(stringMap)); @@ -1215,6 +1217,8 @@ public class ApiCommands { ipObj.put("metadata", ip.getMetadata()); ipObj.put("enabled", ip.isEnabled()); ipObj.put("weight", ip.getWeight()); + ipObj.put("clusterName", ip.getClusterName()); + ipObj.put("serviceName", ip.getServiceName()); hosts.add(ipObj); }