mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 23:09:09 -07:00
issue:43021 add support for onyx version 3.6.6000 and above (#44527)
* issue:43021 add support for onyx version 3.6.6000 Signed-off-by: Samer Deeb <samerd@mellanox.com> * issue:43021 add support for onyx version 3.6.6000 Signed-off-by: Samer Deeb <samerd@mellanox.com>
This commit is contained in:
parent
56b9823bb8
commit
a07af2a1f7
6 changed files with 65 additions and 28 deletions
|
@ -162,6 +162,9 @@ class OnyxL2InterfaceModule(BaseOnyxModule):
|
|||
return int(access_vlan)
|
||||
|
||||
def _create_switchport_data(self, if_name, if_data):
|
||||
if self._os_version >= self.ONYX_API_VERSION:
|
||||
if_data = if_data[0]
|
||||
|
||||
return {
|
||||
'name': if_name,
|
||||
'mode': self.get_config_attr(if_data, 'Mode'),
|
||||
|
@ -174,6 +177,7 @@ class OnyxL2InterfaceModule(BaseOnyxModule):
|
|||
|
||||
def load_current_config(self):
|
||||
# called in base class in run function
|
||||
self._os_version = self._get_os_version()
|
||||
self._current_config = dict()
|
||||
switchports_config = self._get_switchport_config()
|
||||
if not switchports_config:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue