perf: 优化 HUAWEI 设备判断逻辑

This commit is contained in:
Bai
2024-04-22 11:27:48 +08:00
committed by Bryan
parent 1ecf8534f6
commit ad0bc82539
2 changed files with 11 additions and 3 deletions

View File

@@ -125,7 +125,7 @@ class JMSInventory:
else:
host.update(self.make_account_ansible_vars(account, path_dir))
if "huawei" in platform.name.lower() and platform.category == Category.DEVICE.value:
if platform.is_huawei():
host['ansible_connection'] = 'network_cli'
host['ansible_network_os'] = 'asa'