From eec5a2817891c2779c4b72399c630363e4233547 Mon Sep 17 00:00:00 2001 From: wangyu096 Date: Thu, 7 Dec 2023 15:03:35 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20Job=20=E6=94=AF=E6=8C=81=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E6=89=A7=E8=A1=8C=20-=20=E8=84=9A=E6=9C=AC=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=20#2631?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk/job/analysis/service/HostService.java | 2 +- .../service/remote/HostServiceImpl.java | 2 +- .../task/impl/TaskPlanTargetChecker.java | 2 +- .../manage/api/web/WebContainerResource.java | 168 +++++++++++++++++ .../job/manage/api/web/WebHostResource.java | 20 +- .../ServiceGetHostStatusByNodeReq.java | 2 +- .../model/web/request/AgentStatisticsReq.java | 4 +- .../ListTopologyTreesReq.java} | 11 +- .../request/{ipchooser => chooser}/Scope.java | 2 +- .../chooser/container/ContainerCheckReq.java | 45 +++++ .../chooser/container/ContainerDetailReq.java | 43 +++++ .../container/ContainerIdWithMeta.java | 41 ++++ .../ListContainerByTopologyNodesReq.java | 64 +++++++ .../host}/BizTopoNode.java | 2 +- ...HostAgentStatisticsByDynamicGroupsReq.java | 2 +- .../GetHostAgentStatisticsByNodesReq.java | 2 +- .../host}/HostDetailReq.java | 2 +- .../host}/HostIdWithMeta.java | 2 +- .../host}/ListDynamicGroupsReq.java | 2 +- .../host}/ListHostByBizTopologyNodesReq.java | 2 +- .../host}/ListNodeChildrenReq.java | 2 +- .../host}/PageListHostsByDynamicGroupReq.java | 2 +- .../host}/QueryNodesPathReq.java | 2 +- .../whiteip/WhiteIPRecordCreateUpdateReq.java | 2 +- .../model/web/vo/HostInfoWithModulesVO.java | 2 +- .../container/ContainerTopologyNodeVO.java | 66 +++++++ .../web/vo/chooser/container/ContainerVO.java | 69 +++++++ .../inner/impl/ServiceHostResourceImpl.java | 2 +- .../web/impl/WebContainerResourceImpl.java | 177 ++++++++++++++++++ .../api/web/impl/WebHostResourceImpl.java | 22 +-- .../service/host/BizTopoHostService.java | 2 +- .../manage/service/host/ScopeHostService.java | 2 +- .../host/impl/BizTopoHostServiceImpl.java | 2 +- .../host/impl/ScopeHostServiceImpl.java | 2 +- .../service/impl/WhiteIPServiceImpl.java | 2 +- .../service/impl/topo/BizTopoService.java | 2 +- 36 files changed, 723 insertions(+), 55 deletions(-) create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebContainerResource.java rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser/ListTopologyHostCountTreesReq.java => chooser/ListTopologyTreesReq.java} (89%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser}/Scope.java (96%) create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerCheckReq.java create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerDetailReq.java create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerIdWithMeta.java create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ListContainerByTopologyNodesReq.java rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/BizTopoNode.java (98%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/GetHostAgentStatisticsByDynamicGroupsReq.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/GetHostAgentStatisticsByNodesReq.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/HostDetailReq.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/HostIdWithMeta.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/ListDynamicGroupsReq.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/ListHostByBizTopologyNodesReq.java (97%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/ListNodeChildrenReq.java (96%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/PageListHostsByDynamicGroupReq.java (97%) rename src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/{ipchooser => chooser/host}/QueryNodesPathReq.java (96%) create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerTopologyNodeVO.java create mode 100644 src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerVO.java create mode 100644 src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebContainerResourceImpl.java diff --git a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/HostService.java b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/HostService.java index 25668d0718..699620f703 100644 --- a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/HostService.java +++ b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/HostService.java @@ -26,7 +26,7 @@ import com.tencent.bk.job.common.model.dto.HostDTO; import com.tencent.bk.job.manage.model.inner.ServiceHostStatusDTO; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import java.util.List; diff --git a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/remote/HostServiceImpl.java b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/remote/HostServiceImpl.java index 3a1c8e8c97..26491e6800 100644 --- a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/remote/HostServiceImpl.java +++ b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/service/remote/HostServiceImpl.java @@ -31,7 +31,7 @@ import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostStatusByDynamicGroupReq; import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostStatusByHostReq; import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostStatusByNodeReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/task/analysis/task/impl/TaskPlanTargetChecker.java b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/task/analysis/task/impl/TaskPlanTargetChecker.java index cdeebc0026..3cd907a8e3 100644 --- a/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/task/analysis/task/impl/TaskPlanTargetChecker.java +++ b/src/backend/job-analysis/service-job-analysis/src/main/java/com/tencent/bk/job/analysis/task/analysis/task/impl/TaskPlanTargetChecker.java @@ -56,7 +56,7 @@ import com.tencent.bk.job.manage.model.inner.ServiceTaskStepDTO; import com.tencent.bk.job.manage.model.inner.ServiceTaskTemplateDTO; import com.tencent.bk.job.manage.model.inner.resp.ServiceApplicationDTO; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebContainerResource.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebContainerResource.java new file mode 100644 index 0000000000..41f8ab7adb --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebContainerResource.java @@ -0,0 +1,168 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.api.web; + +import com.tencent.bk.job.common.annotation.WebAPI; +import com.tencent.bk.job.common.model.PageData; +import com.tencent.bk.job.common.model.Response; +import com.tencent.bk.job.common.model.dto.AppResourceScope; +import com.tencent.bk.job.manage.model.web.request.chooser.ListTopologyTreesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerCheckReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerDetailReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ListContainerByTopologyNodesReq; +import com.tencent.bk.job.manage.model.web.vo.chooser.container.ContainerTopologyNodeVO; +import com.tencent.bk.job.manage.model.web.vo.chooser.container.ContainerVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestAttribute; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +/** + * 容器管理 WEB API + */ +@Api(tags = {"job-manage", "web", "container_management"}) +@RequestMapping("/web") +@RestController +@WebAPI +public interface WebContainerResource { + + // 容器选择器标准接口-1 + @ApiOperation(value = "获取容器拓扑树(含各节点容器数)", produces = "application/json") + @PostMapping(value = {"/scope/{scopeType}/{scopeId}/topology/container"}) + Response> listTopologyTrees( + @ApiParam("用户名,网关自动传入") + @RequestHeader("username") + String username, + @ApiIgnore + @RequestAttribute(value = "appResourceScope") + AppResourceScope appResourceScope, + @ApiParam(value = "资源范围类型", required = true) + @PathVariable(value = "scopeType") + String scopeType, + @ApiParam(value = "资源范围ID", required = true) + @PathVariable(value = "scopeId") + String scopeId, + @ApiParam(value = "资源范围信息") + @RequestBody(required = false) + ListTopologyTreesReq req + ); + + // 容器选择器标准接口-2 + @ApiOperation(value = "容器选择器根据拓扑节点集合获取容器列表", produces = "application/json") + @PostMapping(value = {"/scope/{scopeType}/{scopeId}/topology/containers/nodes"}) + Response> listContainerByTopologyNodes( + @ApiParam("用户名,网关自动传入") + @RequestHeader("username") + String username, + @ApiIgnore + @RequestAttribute(value = "appResourceScope") + AppResourceScope appResourceScope, + @ApiParam(value = "资源范围类型", required = true) + @PathVariable(value = "scopeType") + String scopeType, + @ApiParam(value = "资源范围ID", required = true) + @PathVariable(value = "scopeId") + String scopeId, + @ApiParam(value = "拓扑节点集合与分页信息", required = true) + @RequestBody + ListContainerByTopologyNodesReq req + ); + + // 容器选择器标准接口-3 + @ApiOperation(value = "容器选择器根据拓扑节点集合获取容器资源ID列表,用于跨页全选容器功能" + , produces = "application/json") + @PostMapping(value = {"/scope/{scopeType}/{scopeId}/topology/containerIds/nodes"}) + Response> listContainerIdByTopologyNodes( + @ApiParam("用户名,网关自动传入") + @RequestHeader("username") + String username, + @ApiIgnore + @RequestAttribute(value = "appResourceScope") + AppResourceScope appResourceScope, + @ApiParam(value = "资源范围类型", required = true) + @PathVariable(value = "scopeType") + String scopeType, + @ApiParam(value = "资源范围ID", required = true) + @PathVariable(value = "scopeId") + String scopeId, + @ApiParam(value = "拓扑节点集合与分页信息", required = true) + @RequestBody + ListContainerByTopologyNodesReq req + ); + + + // 容器选择器标准接口-4 + @ApiOperation(value = "根据用户选择/输入的容器信息获取容器") + @PostMapping(value = {"/scope/{scopeType}/{scopeId}/container/check"}) + Response> checkContainers( + @ApiParam("用户名,网关自动传入") + @RequestHeader("username") + String username, + @ApiIgnore + @RequestAttribute(value = "appResourceScope") + AppResourceScope appResourceScope, + @ApiParam(value = "资源范围类型", required = true) + @PathVariable(value = "scopeType") + String scopeType, + @ApiParam(value = "资源范围ID", required = true) + @PathVariable(value = "scopeId") + String scopeId, + @ApiParam(value = "用户选择/输入的容器信息", required = true) + @RequestBody + ContainerCheckReq req + ); + + // 容器选择器标准接口-5 + @ApiOperation(value = "根据容器资源 ID批量查询容器详情信息") + @PostMapping(value = {"/scope/{scopeType}/{scopeId}/containers/details"}) + Response> getContainerDetails( + @ApiParam("用户名,网关自动传入") + @RequestHeader("username") + String username, + @ApiIgnore + @RequestAttribute(value = "appResourceScope") + AppResourceScope appResourceScope, + @ApiParam(value = "资源范围类型", required = true) + @PathVariable(value = "scopeType") + String scopeType, + @ApiParam(value = "资源范围ID", required = true) + @PathVariable(value = "scopeId") + String scopeId, + @ApiParam(value = "容器ID及元数据信息", required = true) + @RequestBody + ContainerDetailReq req + ); + +} diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebHostResource.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebHostResource.java index 98e5a88071..fd011262b5 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebHostResource.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebHostResource.java @@ -31,15 +31,15 @@ import com.tencent.bk.job.common.model.vo.HostInfoVO; import com.tencent.bk.job.manage.model.web.request.AgentStatisticsReq; import com.tencent.bk.job.manage.model.web.request.HostCheckReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.GetHostAgentStatisticsByDynamicGroupsReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.GetHostAgentStatisticsByNodesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostDetailReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostIdWithMeta; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListDynamicGroupsReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListHostByBizTopologyNodesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListTopologyHostCountTreesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.PageListHostsByDynamicGroupReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.QueryNodesPathReq; +import com.tencent.bk.job.manage.model.web.request.chooser.ListTopologyTreesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.GetHostAgentStatisticsByDynamicGroupsReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.GetHostAgentStatisticsByNodesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostDetailReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.host.ListDynamicGroupsReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.ListHostByBizTopologyNodesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.PageListHostsByDynamicGroupReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.QueryNodesPathReq; import com.tencent.bk.job.manage.model.web.vo.CcTopologyNodeVO; import com.tencent.bk.job.manage.model.web.vo.DynamicGroupBasicVO; import com.tencent.bk.job.manage.model.web.vo.common.AgentStatistics; @@ -126,7 +126,7 @@ Response> listTopologyHostCountTrees( String scopeId, @ApiParam(value = "资源范围信息") @RequestBody(required = false) - ListTopologyHostCountTreesReq req + ListTopologyTreesReq req ); // 标准接口2 diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/inner/request/ServiceGetHostStatusByNodeReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/inner/request/ServiceGetHostStatusByNodeReq.java index cb18e01854..af81fcdb10 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/inner/request/ServiceGetHostStatusByNodeReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/inner/request/ServiceGetHostStatusByNodeReq.java @@ -24,7 +24,7 @@ package com.tencent.bk.job.manage.model.inner.request; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/AgentStatisticsReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/AgentStatisticsReq.java index 7fe110b731..a6ce6ff534 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/AgentStatisticsReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/AgentStatisticsReq.java @@ -25,8 +25,8 @@ package com.tencent.bk.job.manage.model.web.request; import com.tencent.bk.job.common.model.vo.DynamicGroupIdWithMeta; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostIdWithMeta; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListTopologyHostCountTreesReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/ListTopologyTreesReq.java similarity index 89% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListTopologyHostCountTreesReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/ListTopologyTreesReq.java index 670120a312..c629f19305 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListTopologyHostCountTreesReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/ListTopologyTreesReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -30,14 +30,9 @@ import java.util.List; -/** - * @Description - * @Date 2020/3/23 - * @Version 1.0 - */ @Data -@ApiModel("获取含主机数量的拓扑树") -public class ListTopologyHostCountTreesReq { +@ApiModel("获取拓扑树请求") +public class ListTopologyTreesReq { @ApiModelProperty(value = "是否获取所有资源范围的拓扑结构,默认为false", required = true) Boolean allScope = false; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/Scope.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/Scope.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/Scope.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/Scope.java index ee5fa64aef..49e54cef88 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/Scope.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/Scope.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerCheckReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerCheckReq.java new file mode 100644 index 0000000000..1577e5e7f7 --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerCheckReq.java @@ -0,0 +1,45 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.request.chooser.container; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +@ApiModel("容器检查请求报文") +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ContainerCheckReq { + + @ApiModelProperty(value = "容器Uid列表", required = true) + private List containerUidList = new ArrayList<>(); + +} + + diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerDetailReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerDetailReq.java new file mode 100644 index 0000000000..b65066b4f5 --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerDetailReq.java @@ -0,0 +1,43 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.request.chooser.container; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +@ApiModel("容器详情请求报文") +public class ContainerDetailReq { + + @ApiModelProperty(value = "containerId及元数据列表", required = true) + List containerList = new ArrayList<>(); + +} + + diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerIdWithMeta.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerIdWithMeta.java new file mode 100644 index 0000000000..b728cca2cf --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ContainerIdWithMeta.java @@ -0,0 +1,41 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.request.chooser.container; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Map; + +@Data +@ApiModel("容器ID及元数据") +public class ContainerIdWithMeta { + @ApiModelProperty(value = "容器资源 ID", required = true) + private Long containerId; + + @ApiModelProperty(value = "容器元数据;Job不支持") + Map meta; +} diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ListContainerByTopologyNodesReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ListContainerByTopologyNodesReq.java new file mode 100644 index 0000000000..262cb1c293 --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/container/ListContainerByTopologyNodesReq.java @@ -0,0 +1,64 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.request.chooser.container; + +import com.tencent.bk.job.manage.model.web.vo.chooser.container.ContainerTopologyNodeVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + + +@NoArgsConstructor +@AllArgsConstructor +@Data +@ApiModel("通过拓扑节点集合获取容器集合") +public class ListContainerByTopologyNodesReq { + + @ApiModelProperty(value = "拓扑节点列表", required = true) + private List nodeList; + + @ApiModelProperty(value = "筛选条件:容器ID") + private String containerUid; + + @ApiModelProperty(value = "筛选条件:容器名称") + private String name; + + @ApiModelProperty(value = "筛选条件:Pod名称") + private String podName; + + @ApiModelProperty(value = "筛选条件:Pod lable") + private Map podLabels; + + @ApiModelProperty(value = "数据起始位置") + private Long start; + + @ApiModelProperty(value = "拉取数量") + private Long pageSize; +} diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/BizTopoNode.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/BizTopoNode.java similarity index 98% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/BizTopoNode.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/BizTopoNode.java index eb5bb4bf6a..0ee88aa611 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/BizTopoNode.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/BizTopoNode.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import com.tencent.bk.job.common.model.vo.TargetNodeVO; import io.swagger.annotations.ApiModel; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByDynamicGroupsReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByDynamicGroupsReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByDynamicGroupsReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByDynamicGroupsReq.java index 9cac8f1ffd..32ae077908 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByDynamicGroupsReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByDynamicGroupsReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import com.tencent.bk.job.common.model.vo.DynamicGroupIdWithMeta; import io.swagger.annotations.ApiModel; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByNodesReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByNodesReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByNodesReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByNodesReq.java index c8b161f38e..d426d112a8 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/GetHostAgentStatisticsByNodesReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/GetHostAgentStatisticsByNodesReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import com.tencent.bk.job.common.model.vo.TargetNodeVO; import io.swagger.annotations.ApiModel; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostDetailReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostDetailReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostDetailReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostDetailReq.java index 94436e075e..c8c9931b84 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostDetailReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostDetailReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostIdWithMeta.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostIdWithMeta.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostIdWithMeta.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostIdWithMeta.java index 9def6bbf79..c928f4fc5c 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/HostIdWithMeta.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/HostIdWithMeta.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListDynamicGroupsReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListDynamicGroupsReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListDynamicGroupsReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListDynamicGroupsReq.java index fa3262f1de..5dbdf905e0 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListDynamicGroupsReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListDynamicGroupsReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import com.tencent.bk.job.common.model.vo.DynamicGroupIdWithMeta; import io.swagger.annotations.ApiModel; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListHostByBizTopologyNodesReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListHostByBizTopologyNodesReq.java similarity index 97% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListHostByBizTopologyNodesReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListHostByBizTopologyNodesReq.java index f0c46d85d3..672c152654 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListHostByBizTopologyNodesReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListHostByBizTopologyNodesReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListNodeChildrenReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListNodeChildrenReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListNodeChildrenReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListNodeChildrenReq.java index 6cad1e8750..aa7b44f152 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/ListNodeChildrenReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/ListNodeChildrenReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/PageListHostsByDynamicGroupReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/PageListHostsByDynamicGroupReq.java similarity index 97% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/PageListHostsByDynamicGroupReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/PageListHostsByDynamicGroupReq.java index 6aa97ccec8..9a8a2ab58b 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/PageListHostsByDynamicGroupReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/PageListHostsByDynamicGroupReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/QueryNodesPathReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/QueryNodesPathReq.java similarity index 96% rename from src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/QueryNodesPathReq.java rename to src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/QueryNodesPathReq.java index 87fd5d34cf..e4db13240c 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/ipchooser/QueryNodesPathReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/chooser/host/QueryNodesPathReq.java @@ -22,7 +22,7 @@ * IN THE SOFTWARE. */ -package com.tencent.bk.job.manage.model.web.request.ipchooser; +package com.tencent.bk.job.manage.model.web.request.chooser.host; import com.tencent.bk.job.common.model.vo.TargetNodeVO; import io.swagger.annotations.ApiModel; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/whiteip/WhiteIPRecordCreateUpdateReq.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/whiteip/WhiteIPRecordCreateUpdateReq.java index b40e679a72..b87a7743dd 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/whiteip/WhiteIPRecordCreateUpdateReq.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/request/whiteip/WhiteIPRecordCreateUpdateReq.java @@ -25,7 +25,7 @@ package com.tencent.bk.job.manage.model.web.request.whiteip; import com.tencent.bk.job.common.model.dto.ResourceScope; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostIdWithMeta; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/HostInfoWithModulesVO.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/HostInfoWithModulesVO.java index 32bd72f9b5..7722f059fa 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/HostInfoWithModulesVO.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/HostInfoWithModulesVO.java @@ -26,7 +26,7 @@ import com.tencent.bk.job.common.model.vo.CloudAreaInfoVO; import com.tencent.bk.job.common.util.JobContextUtil; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerTopologyNodeVO.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerTopologyNodeVO.java new file mode 100644 index 0000000000..0a8e613da9 --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerTopologyNodeVO.java @@ -0,0 +1,66 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.vo.chooser.container; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.util.List; + +/** + * 容器拓扑节点 + */ +@Getter +@Setter +@ToString +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel("容器拓扑节点") +public class ContainerTopologyNodeVO { + @ApiModelProperty("节点实例 ID") + private Long instanceId; + + @ApiModelProperty("节点实例名称") + private String instanceName; + + @ApiModelProperty("节点类型 ID") + private String objectId; + + @ApiModelProperty("节点类型名称") + private String objectName; + + // 当前层级节点数据是否使用懒加载,作业平台目前不涉及,取值一直为false即可 + @ApiModelProperty("当前层级节点数据是否使用懒加载") + private Boolean lazy = false; + + @ApiModelProperty("子节点") + private List child; + + @ApiModelProperty("节点包含的容器数量") + private int count; +} diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerVO.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerVO.java new file mode 100644 index 0000000000..31c3c6184d --- /dev/null +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/web/vo/chooser/container/ContainerVO.java @@ -0,0 +1,69 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.model.web.vo.chooser.container; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.util.Map; + +/** + * 容器 + */ +@Getter +@Setter +@ToString +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel("容器") +public class ContainerVO { + + @ApiModelProperty("容器资源 ID, 容器在 cmdb 中注册资源的 ID") + private Long id; + + @ApiModelProperty(value = "容器 ID", example = "docker://8812391923...") + private String uid; + + @ApiModelProperty("容器名称") + private String name; + + @ApiModelProperty("Pod名称") + private String podName; + + @ApiModelProperty("所属 pod labels") + private Map podLabels; + + @ApiModelProperty("所属 Node hostId") + private String nodeHostId; + + @ApiModelProperty("所属 Node Ip") + private String nodeIp; + + @ApiModelProperty("所属 Node GSE agent 状态") + private String nodeAgentStatus; +} diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceHostResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceHostResourceImpl.java index 746e279504..e0ae8cac1d 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceHostResourceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceHostResourceImpl.java @@ -42,7 +42,7 @@ import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostStatusByHostReq; import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostStatusByNodeReq; import com.tencent.bk.job.manage.model.inner.request.ServiceGetHostsByCloudIpv6Req; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import com.tencent.bk.job.manage.service.ApplicationService; import com.tencent.bk.job.manage.service.host.BizTopoHostService; import com.tencent.bk.job.manage.service.host.HostDetailService; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebContainerResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebContainerResourceImpl.java new file mode 100644 index 0000000000..cacb704323 --- /dev/null +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebContainerResourceImpl.java @@ -0,0 +1,177 @@ +/* + * Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. + * + * License for BK-JOB蓝鲸智云作业平台: + * -------------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +package com.tencent.bk.job.manage.api.web.impl; + +import com.tencent.bk.job.common.model.PageData; +import com.tencent.bk.job.common.model.Response; +import com.tencent.bk.job.common.model.dto.AppResourceScope; +import com.tencent.bk.job.manage.api.web.WebContainerResource; +import com.tencent.bk.job.manage.model.web.request.chooser.ListTopologyTreesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerCheckReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerDetailReq; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ContainerIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.container.ListContainerByTopologyNodesReq; +import com.tencent.bk.job.manage.model.web.vo.chooser.container.ContainerTopologyNodeVO; +import com.tencent.bk.job.manage.model.web.vo.chooser.container.ContainerVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +@Slf4j +public class WebContainerResourceImpl implements WebContainerResource { + @Override + public Response> listTopologyTrees(String username, + AppResourceScope appResourceScope, + String scopeType, + String scopeId, + ListTopologyTreesReq req) { + List workloads = new ArrayList<>(); + ContainerTopologyNodeVO workload = new ContainerTopologyNodeVO(); + workload.setInstanceId(1L); + workload.setInstanceName("bk-job-execute"); + workload.setObjectId("deployment"); + workload.setObjectName("deployment"); + workload.setCount(1); + workloads.add(workload); + + List namespaces = new ArrayList<>(); + ContainerTopologyNodeVO namespace = new ContainerTopologyNodeVO(); + namespace.setInstanceId(1L); + namespace.setInstanceName("bk-job-dev"); + namespace.setObjectId("namespace"); + namespace.setObjectName("namespace"); + namespace.setCount(1); + namespace.setChild(workloads); + namespaces.add(namespace); + + List clusters = new ArrayList<>(); + ContainerTopologyNodeVO cluster = new ContainerTopologyNodeVO(); + cluster.setInstanceId(1L); + cluster.setInstanceName("BCS-K8S-12312"); + cluster.setObjectId("cluster"); + cluster.setObjectName("cluster"); + cluster.setCount(1); + cluster.setChild(namespaces); + clusters.add(cluster); + + ContainerTopologyNodeVO topo = new ContainerTopologyNodeVO(); + topo.setInstanceId(2L); + topo.setInstanceName("蓝鲸"); + topo.setObjectId("biz"); + topo.setObjectName("业务"); + topo.setCount(1); + topo.setChild(clusters); + + return Response.buildSuccessResp( + Collections.singletonList( + topo + ) + ); + } + + @Override + public Response> listContainerByTopologyNodes(String username, + AppResourceScope appResourceScope, + String scopeType, + String scopeId, + ListContainerByTopologyNodesReq req) { + ContainerVO containerVO = new ContainerVO(); + containerVO.setId(1L); + containerVO.setName("job-execute"); + containerVO.setPodName("bk-job-execute-6c5c88cdb9-pwthx"); + containerVO.setUid("docker://076f9622ff3f2f6e0822dc1ae7b0c26c8e451110f75aec0908349bd923dfce5c"); + Map podLabels = new HashMap<>(); + podLabels.put("app.kubernetes.io/component", "job-execute"); + podLabels.put("app.kubernetes.io/instance", "bk-job"); + containerVO.setPodLabels(podLabels); + + PageData result = new PageData<>(); + result.setData(Collections.singletonList(containerVO)); + result.setStart(0); + result.setTotal(1L); + return Response.buildSuccessResp(result); + } + + @Override + public Response> listContainerIdByTopologyNodes( + String username, + AppResourceScope appResourceScope, + String scopeType, + String scopeId, + ListContainerByTopologyNodesReq req) { + + ContainerIdWithMeta containerIdWithMeta = new ContainerIdWithMeta(); + containerIdWithMeta.setContainerId(1L); + + PageData result = new PageData<>(); + result.setData(Collections.singletonList(containerIdWithMeta)); + result.setStart(0); + result.setTotal(1L); + + return Response.buildSuccessResp(result); + } + + @Override + public Response> checkContainers(String username, + AppResourceScope appResourceScope, + String scopeType, + String scopeId, + ContainerCheckReq req) { + ContainerVO containerVO = new ContainerVO(); + containerVO.setId(1L); + containerVO.setName("job-execute"); + containerVO.setPodName("bk-job-execute-6c5c88cdb9-pwthx"); + containerVO.setUid("docker://076f9622ff3f2f6e0822dc1ae7b0c26c8e451110f75aec0908349bd923dfce5c"); + Map podLabels = new HashMap<>(); + podLabels.put("app.kubernetes.io/component", "job-execute"); + podLabels.put("app.kubernetes.io/instance", "bk-job"); + containerVO.setPodLabels(podLabels); + return Response.buildSuccessResp(Collections.singletonList(containerVO)); + } + + @Override + public Response> getContainerDetails(String username, + AppResourceScope appResourceScope, + String scopeType, + String scopeId, + ContainerDetailReq req) { + ContainerVO containerVO = new ContainerVO(); + containerVO.setId(1L); + containerVO.setName("job-execute"); + containerVO.setPodName("bk-job-execute-6c5c88cdb9-pwthx"); + containerVO.setUid("docker://076f9622ff3f2f6e0822dc1ae7b0c26c8e451110f75aec0908349bd923dfce5c"); + Map podLabels = new HashMap<>(); + podLabels.put("app.kubernetes.io/component", "job-execute"); + podLabels.put("app.kubernetes.io/instance", "bk-job"); + containerVO.setPodLabels(podLabels); + return Response.buildSuccessResp(Collections.singletonList(containerVO)); + } +} diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebHostResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebHostResourceImpl.java index 9685445db5..9f2396c4f2 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebHostResourceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebHostResourceImpl.java @@ -44,16 +44,16 @@ import com.tencent.bk.job.manage.model.dto.DynamicGroupDTO; import com.tencent.bk.job.manage.model.web.request.AgentStatisticsReq; import com.tencent.bk.job.manage.model.web.request.HostCheckReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; -import com.tencent.bk.job.manage.model.web.request.ipchooser.GetHostAgentStatisticsByDynamicGroupsReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.GetHostAgentStatisticsByNodesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostDetailReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostIdWithMeta; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListDynamicGroupsReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListHostByBizTopologyNodesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.ListTopologyHostCountTreesReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.PageListHostsByDynamicGroupReq; -import com.tencent.bk.job.manage.model.web.request.ipchooser.QueryNodesPathReq; +import com.tencent.bk.job.manage.model.web.request.chooser.ListTopologyTreesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.GetHostAgentStatisticsByDynamicGroupsReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.GetHostAgentStatisticsByNodesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostDetailReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.host.ListDynamicGroupsReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.ListHostByBizTopologyNodesReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.PageListHostsByDynamicGroupReq; +import com.tencent.bk.job.manage.model.web.request.chooser.host.QueryNodesPathReq; import com.tencent.bk.job.manage.model.web.vo.CcTopologyNodeVO; import com.tencent.bk.job.manage.model.web.vo.DynamicGroupBasicVO; import com.tencent.bk.job.manage.model.web.vo.common.AgentStatistics; @@ -135,7 +135,7 @@ public Response> listTopologyHostCountTrees(String userna AppResourceScope appResourceScope, String scopeType, String scopeId, - ListTopologyHostCountTreesReq req) { + ListTopologyTreesReq req) { return Response.buildSuccessResp( Collections.singletonList( scopeTopoHostService.listAppTopologyHostCountTree(username, appResourceScope) diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/BizTopoHostService.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/BizTopoHostService.java index a98a3eb203..40c21ba401 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/BizTopoHostService.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/BizTopoHostService.java @@ -25,7 +25,7 @@ package com.tencent.bk.job.manage.service.host; import com.tencent.bk.job.common.model.dto.ApplicationHostDTO; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import java.util.List; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/ScopeHostService.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/ScopeHostService.java index 9278a43f36..ddaccd7649 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/ScopeHostService.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/ScopeHostService.java @@ -27,7 +27,7 @@ import com.tencent.bk.job.common.model.PageData; import com.tencent.bk.job.common.model.dto.AppResourceScope; import com.tencent.bk.job.common.model.dto.ApplicationHostDTO; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import java.util.Collection; import java.util.List; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/BizTopoHostServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/BizTopoHostServiceImpl.java index 13b98a8d19..adc993b555 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/BizTopoHostServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/BizTopoHostServiceImpl.java @@ -25,7 +25,7 @@ package com.tencent.bk.job.manage.service.host.impl; import com.tencent.bk.job.common.model.dto.ApplicationHostDTO; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import com.tencent.bk.job.manage.service.host.BizHostService; import com.tencent.bk.job.manage.service.host.BizTopoHostService; import com.tencent.bk.job.manage.service.impl.topo.BizTopoService; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/ScopeHostServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/ScopeHostServiceImpl.java index a5c066f9c3..79e42b0e9d 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/ScopeHostServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/host/impl/ScopeHostServiceImpl.java @@ -32,7 +32,7 @@ import com.tencent.bk.job.common.util.StringUtil; import com.tencent.bk.job.common.util.ip.IpUtils; import com.tencent.bk.job.manage.model.query.HostQuery; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import com.tencent.bk.job.manage.service.ApplicationService; import com.tencent.bk.job.manage.service.host.BizHostService; import com.tencent.bk.job.manage.service.host.ScopeHostService; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/WhiteIPServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/WhiteIPServiceImpl.java index feab2784a2..22f55dc7ff 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/WhiteIPServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/WhiteIPServiceImpl.java @@ -58,7 +58,7 @@ import com.tencent.bk.job.manage.model.dto.whiteip.WhiteIPIPDTO; import com.tencent.bk.job.manage.model.dto.whiteip.WhiteIPRecordDTO; import com.tencent.bk.job.manage.model.inner.ServiceWhiteIPInfo; -import com.tencent.bk.job.manage.model.web.request.ipchooser.HostIdWithMeta; +import com.tencent.bk.job.manage.model.web.request.chooser.host.HostIdWithMeta; import com.tencent.bk.job.manage.model.web.request.whiteip.WhiteIPRecordCreateUpdateReq; import com.tencent.bk.job.manage.model.web.vo.whiteip.ActionScopeVO; import com.tencent.bk.job.manage.model.web.vo.whiteip.WhiteIPRecordVO; diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/topo/BizTopoService.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/topo/BizTopoService.java index 0c98e84e9f..c44b129cbf 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/topo/BizTopoService.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/topo/BizTopoService.java @@ -29,7 +29,7 @@ import com.tencent.bk.job.common.cc.sdk.BizCmdbClient; import com.tencent.bk.job.common.cc.util.TopologyUtil; import com.tencent.bk.job.common.util.json.JsonUtils; -import com.tencent.bk.job.manage.model.web.request.ipchooser.BizTopoNode; +import com.tencent.bk.job.manage.model.web.request.chooser.host.BizTopoNode; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;