From 4b635041a5dfb02bceabf36ca4c40211761771d7 Mon Sep 17 00:00:00 2001 From: jingrow Date: Mon, 11 Aug 2025 19:32:26 +0800 Subject: [PATCH] =?UTF-8?q?deploy=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=BC=80=E9=80=9A=E6=9C=8D=E5=8A=A1=E5=99=A83000/4000?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jcloud/api/aliyun_server_light.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jcloud/api/aliyun_server_light.py b/jcloud/api/aliyun_server_light.py index dfa9a8d..821845b 100644 --- a/jcloud/api/aliyun_server_light.py +++ b/jcloud/api/aliyun_server_light.py @@ -1899,6 +1899,10 @@ def execute_jsite_task(instance_id, mode='deploy', command_content=None, **kwarg if not command_content: return {"success": False, "message": "缺少command_content参数"} + # 如果mode为deploy,开通3000/4000端口 + if mode == 'deploy': + create_aliyun_firewall_rule(instance_id, 'TCP', '3000/4000', 'Jsite', region_id) + # 执行命令,不传入参数字典 manager = _get_manager() result = manager.run_command(instance_id, command_content, parameters=None, command_name=mode, region_id=region_id, timeout=3600)