Skip to content

Commit

Permalink
feat: 订阅下发支持动态分组 (closed #2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
ping15 committed Dec 12, 2024
1 parent f52bde6 commit a5971a5
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion apps/backend/subscription/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,24 @@ def get_instances_by_scope(scope: Dict[str, Union[Dict, int, Any]]) -> Dict[str,

# 按照动态分组查询
elif scope["node_type"] == models.Subscription.NodeType.DYNAMIC_GROUP:
pass
if scope["object_type"] == models.Subscription.ObjectType.HOST:
"""主机动态分组"""
# nodes = [
# {
# "bk_biz_id": 1,
# "group_id": "xxx",
# },
# {
# "bk_biz_id": 2,
# "group_id": "yyy",
# }
# ]

#

# 3. 当bk_obj_id为set时
else:
"""服务动态分组"""

if not need_register:
# 补充必要的主机或实例相关信息
Expand Down

0 comments on commit a5971a5

Please sign in to comment.