From 9a02fecfbf4d207fc8b7b19203af1fac31e2ba3b Mon Sep 17 00:00:00 2001 From: jsonwan Date: Wed, 10 Jan 2024 15:42:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=8F=90=E4=BE=9B=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=B8=8E=E6=AD=A5=E9=AA=A4=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=9F=A5=E8=AF=A2=E7=9A=84APIGW=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20#2596?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 步骤详情接口添加bk_cloud_name字段 --- .../v3/zh/get_step_instance_detail.md | 20 +++++++++++-------- .../bk/job/common/esb/model/job/EsbIpDTO.java | 5 +++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md index a929f43e05..178b9a3d67 100644 --- a/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md +++ b/docs/apidoc/bk-api-gateway/v3/zh/get_step_instance_detail.md @@ -59,6 +59,7 @@ "ip_list": [{ "bk_host_id": 1, "bk_cloud_id": 0, + "bk_cloud_name": "Default Area", "ip": "192.168.1.1", "ipv6": null, "bk_agent_id": "020000000052540079809816967513755991", @@ -89,6 +90,7 @@ "ip_list": [{ "bk_host_id": 1, "bk_cloud_id": 0, + "bk_cloud_name": "Default Area", "ip": "192.168.1.1", "ipv6": null, "bk_agent_id": "020000000052540079809816967513755991", @@ -121,6 +123,7 @@ "ip_list": [{ "bk_host_id": 1, "bk_cloud_id": 0, + "bk_cloud_name": "Default Area", "ip": "192.168.1.1", "ipv6": null, "bk_agent_id": "020000000052540079809816967513755991", @@ -203,14 +206,15 @@ ##### host -| 字段 | 类型 | 是否一定存在 | 描述 | -|-------------|-----------|------------|-----------| -| bk_host_id | long | 是 | 主机ID | -| bk_cloud_id | long | 否 | 管控区域ID | -| ip | string | 否 | IP | -| ipv6 | string | 否 | IPv6 | -| bk_agent_id | string | 否 | Agent ID | -| alive | int | 否 | Agent是否正常,取值为:1-正常,0-异常 | +| 字段 | 类型 | 是否一定存在 | 描述 | +|---------------|-----------|------------|-----------| +| bk_host_id | long | 是 | 主机ID | +| bk_cloud_id | long | 否 | 管控区域ID | +| bk_cloud_name | string | 否 | 管控区域名称 | +| ip | string | 否 | IP | +| ipv6 | string | 否 | IPv6 | +| bk_agent_id | string | 否 | Agent ID | +| alive | int | 否 | Agent是否正常,取值为:1-正常,0-异常 | ##### topo_node diff --git a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java index b87878ce51..7152619ee9 100644 --- a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java +++ b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/job/EsbIpDTO.java @@ -52,6 +52,10 @@ public class EsbIpDTO { @JsonPropertyDescription("BK-Network Area") private Long bkCloudId; + @JsonProperty("bk_cloud_name") + @JsonPropertyDescription("BK-Network Area Name") + private String bkCloudName; + @JsonProperty("ip") @Pattern(regexp = "\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)" + "\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)" + @@ -95,6 +99,7 @@ public static EsbIpDTO fromHost(HostDTO host) { } EsbIpDTO esbIp = new EsbIpDTO(); esbIp.setBkCloudId(host.getBkCloudId()); + esbIp.setBkCloudName(host.getBkCloudName()); esbIp.setIp(host.getIp()); esbIp.setIpv6(host.getIpv6()); esbIp.setHostId(host.getHostId());