Skip to content

Commit

Permalink
feat: 支持安装arm架构proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyoung3 committed Oct 25, 2024
1 parent 221e3ad commit f40c09b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
class PushFilesToProxyService(AgentTransferFileService):
def get_file_list(self, data, common_data: AgentCommonData, host: models.Host) -> List[str]:
file_list = data.get_one_of_inputs("file_list", default=[])
exclude_map = {
constants.CpuType.x86_64: ("aarch64.tgz",),
constants.CpuType.aarch64: ("x86_64.tgz",),
}
# 获取当前架构对应的排除后缀
exclude_suffix = exclude_map.get(host.cpu_arch, tuple())
# 如果存在排除后缀,则进行过滤
if exclude_suffix:
file_list = [item for item in file_list if not item.endswith(exclude_suffix)]
from_type = data.get_one_of_inputs("from_type")
host_ap: Optional[models.AccessPoint] = self.get_host_ap(common_data, host)
if not host_ap:
Expand Down

0 comments on commit f40c09b

Please sign in to comment.