From a608ebc9136298485dd6b047d49c9207e9d24ad0 Mon Sep 17 00:00:00 2001 From: Leonard Yu Date: Thu, 15 Jun 2023 11:21:45 +0200 Subject: [PATCH] Add free module in module_port_config --- xoa_driver/functions/mgmt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xoa_driver/functions/mgmt.py b/xoa_driver/functions/mgmt.py index 52a97c4a..42e6f3a9 100644 --- a/xoa_driver/functions/mgmt.py +++ b/xoa_driver/functions/mgmt.py @@ -235,6 +235,7 @@ async def set_module_port_config( """ # reserve the module first + await free_module(module, True) await reserve_module(module, force) # get the supported media by the module @@ -255,6 +256,7 @@ async def set_module_port_config( ): portspeed_list = [port_count] + port_count * [port_speed] await module.cfp.config.set(portspeed_list=portspeed_list) + await free_module(module, False) return None raise NotSupportPortSpeed(module)