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:
Samer Deeb 2018-08-23 23:59:10 -07:00 committed by John R Barker
parent 56b9823bb8
commit a07af2a1f7
6 changed files with 65 additions and 28 deletions

View file

@ -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: