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)