issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)

* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
This commit is contained in:
Samer Deeb 2018-03-28 09:13:54 -07:00 committed by John R Barker
parent 7324f49829
commit 9dfb665e43
2 changed files with 15 additions and 2 deletions

View file

@ -140,12 +140,20 @@ class OnyxPfcInterfaceModule(BaseOnyxModule):
def load_current_config(self):
# called in base class in run function
self._os_version = self._get_os_version()
self._current_config = dict()
pfc_config = self._get_pfc_config()
if not pfc_config:
return
if 'Table 2' in pfc_config:
pfc_config = pfc_config['Table 2']
if self._os_version >= self.ONYX_API_VERSION:
if len(pfc_config) >= 3:
pfc_config = pfc_config[2]
else:
pfc_config = dict()
else:
if 'Table 2' in pfc_config:
pfc_config = pfc_config['Table 2']
for if_name, if_pfc_data in iteritems(pfc_config):
match = self.PFC_IF_REGEX.match(if_name)
if not match: