mirror of https://github.com/jumpserver/jumpserver
perf: 兼容自定义平台的华为交换机执行命令
parent
94286caec4
commit
1ecf8534f6
|
@ -5,6 +5,7 @@ import re
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
from assets.const.category import Category
|
||||||
|
|
||||||
__all__ = ['JMSInventory']
|
__all__ = ['JMSInventory']
|
||||||
|
|
||||||
|
@ -124,7 +125,7 @@ class JMSInventory:
|
||||||
else:
|
else:
|
||||||
host.update(self.make_account_ansible_vars(account, path_dir))
|
host.update(self.make_account_ansible_vars(account, path_dir))
|
||||||
|
|
||||||
if platform.name == 'Huawei':
|
if "huawei" in platform.name.lower() and platform.category == Category.DEVICE.value:
|
||||||
host['ansible_connection'] = 'network_cli'
|
host['ansible_connection'] = 'network_cli'
|
||||||
host['ansible_network_os'] = 'asa'
|
host['ansible_network_os'] = 'asa'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue