Skip to content

Commit

Permalink
feat:表迁移及调用各系统写入租户ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyoung3 committed Jan 17, 2025
1 parent 335e8cd commit eb5e702
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions apps/node_man/handlers/cmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from django.core.cache import cache
from django.utils.translation import gettext as _

from apps.component.esbclient import client_v2
from apps.exceptions import ComponentCallError
from apps.iam import Permission
from apps.iam.exceptions import PermissionDeniedError
Expand Down Expand Up @@ -589,7 +588,7 @@ def find_host_service_template(bk_host_ids: List[int]) -> List[Dict]:
for page in range(math.ceil(len(bk_host_ids) / constants.QUERY_HOST_SERVICE_TEMPLATE_LIMIT))
]
host_service_templates = request_multi_thread(
client_v2.cc.find_host_service_template, param_list, get_data=lambda x: x
CCApi.find_host_service_template, param_list, get_data=lambda x: x
)
return host_service_templates

Expand Down
9 changes: 9 additions & 0 deletions common/api/modules/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,12 @@ def __init__(self):
before_request=add_esb_info_before_request,
api_name="find_host_by_topo",
)
self.find_host_service_template = DataAPI(
method="POST",
url=CC_APIGATEWAY_ROOT_V2 + "findmany/hosts/service_template/",
module=self.MODULE,
simple_module=self.SIMPLE_MODULE,
description="查询主机服务模板",
before_request=add_esb_info_before_request,
api_name="find_host_service_template",
)

0 comments on commit eb5e702

Please sign in to comment.