Skip to content

Commit

Permalink
feat: 提供 Agent 包管理后台基础接口 (closed #1683)
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 22541
  • Loading branch information
ping15 committed Nov 5, 2024
1 parent a1b6a0c commit a5312b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions apps/backend/subscription/steps/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,18 @@ def make_instances_migrate_actions(self, instances, auto_trigger=False, preview_
# Agent2 走自更新,仍需调整
backend_const.ActionNameType.UPGRADE_PROXY: backend_const.ActionNameType.UPGRADE_PROXY,
}
version_map: Dict[int, str] = {
version_map["bk_host_id"]: version_map["version"]
for version_map in self.subscription_step.config.get("version_map_list", [])
}
for instance_id, instance in instances.items():
if instance["meta"]["GSE_VERSION"] == GseVersion.V1.value:
instance_actions[instance_id] = self.subscription_step.config["job_type"]
continue
instance_actions[instance_id] = job_type_map[self.subscription_step.config["job_type"]]

if instance_actions[instance_id] == backend_const.ActionNameType.UPGRADE_AGENT:
version_map: Dict[int, str] = {
version_map["bk_host_id"]: version_map["version"]
for version_map in self.subscription_step.config.get("version_map_list", [])
}

bk_host_id: int = instance["host"]["bk_host_id"]
agent_version: str = models.ProcessStatus.objects.get(
bk_host_id=bk_host_id, name=models.ProcessStatus.GSE_AGENT_PROCESS_NAME
Expand Down
Binary file modified locale/en/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1029,12 +1029,12 @@ msgstr ""
#: apps/backend/components/collections/plugin.py:1503
#: apps/backend/constants.py:137
msgid "启用"
msgstr "enabled"
msgstr "Enable"

#: apps/backend/components/collections/plugin.py:1488
#: apps/backend/components/collections/plugin.py:1503
msgid "停用"
msgstr "disabled"
msgstr "Disable"

#: apps/backend/components/collections/plugin.py:1499
#, python-brace-format
Expand Down

0 comments on commit a5312b4

Please sign in to comment.